middlewares

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBUnavailableError = "Indexer DB is not available, try again later."

DBUnavailableError is the error returned when a migration is in progress or required.

Functions

func MakeAuth

func MakeAuth(header string, tokens []string) echo.MiddlewareFunc

MakeAuth constructs the auth middleware function

func MakeLogger

func MakeLogger(log *log.Logger) echo.MiddlewareFunc

MakeLogger initializes a logger echo.MiddlewareFunc

func MakeMigrationMiddleware

func MakeMigrationMiddleware(idb idb.IndexerDb) echo.MiddlewareFunc

MakeMigrationMiddleware constructs the migration middleware

func PrometheusPathMapper404Sink

func PrometheusPathMapper404Sink(c echo.Context) string

PrometheusPathMapper404Sink if the status is 404, truncate the path to ensure no personal data is leaked.

func PrometheusPathMapperVerbose

func PrometheusPathMapperVerbose(c echo.Context) string

PrometheusPathMapperVerbose adds query parameters to the path in addition to the PrometheusPathMapper404Sink.

Types

type MigrationMiddleware

type MigrationMiddleware struct {
	// contains filtered or unexported fields
}

MigrationMiddleware makes sure a 500 error is returned when the IndexerDb has a migration in progress.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL