wired

package
v0.18.0-beta08 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package wired contains wire provider for external dependencies or code shared between Prisme mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideClickhouseConfig

func ProvideClickhouseConfig(bootstrapLogger BootstrapLogger) config.Clickhouse

ProvideClickhouseConfig is a wire provider for config.Clickhouse.

func ProvideFiber

func ProvideFiber(
	apiEventsTimeoutMiddleware middlewares.ApiEventsTimeout,
	eventsCorsMiddleware middlewares.EventsCors,
	eventsRateLimiterMiddleware middlewares.EventsRateLimiter,
	getNoscriptCustomEventHandler handlers.GetNoscriptEventsCustom,
	getNoscriptOutboundLinkEventHandler handlers.GetNoscriptEventsOutboundLink,
	getNoscriptPageViewEventHandler handlers.GetNoscriptEventsPageviews,
	minimalFiber MinimalFiber,
	nonRegisteredOriginFilterMiddleware middlewares.NonRegisteredOriginFilter,
	noscriptHandlersCacheMiddleware middlewares.NoscriptHandlersCache,
	postCustomEventHandler handlers.PostEventsCustom,
	postFileDownloadEventHandler handlers.PostEventsFileDownload,
	postOutboundLinkEventHandler handlers.PostEventsOutboundLink,
	postPageViewEventHandler handlers.PostEventsPageviews,
	referrerAsDefaultOriginMiddleware middlewares.ReferrerAsDefaultOrigin,
) *fiber.App

ProvideFiber is a wire provider for fiber.App.

func ProvideFiberStorage added in v0.15.0

func ProvideFiberStorage() storage.Storage

ProvideFiberStorage is a wire provider for fiber storage.

func ProvideGrafanaConfig

func ProvideGrafanaConfig(bootstrapLogger BootstrapLogger) config.Grafana

ProvideGrafanaConfig is a wire provider for config.Server.

func ProvideLogger

func ProvideLogger(cfg config.Server) zerolog.Logger

ProvideLogger is a wire provider for zerolog.Logger.

func ProvideMinimalFiberConfig added in v0.10.0

func ProvideMinimalFiberConfig(
	cfg config.Server,
) fiber.Config

ProvideMinimalFiberConfig is a wire provider for fiber configuration.

func ProvidePromHttpLogger added in v0.15.0

func ProvidePromHttpLogger(cfg config.Server, logger zerolog.Logger) promhttp.Logger

ProvidePromHttpLogger is a wire provider for promhttp.Logger.

func ProvidePrometheusRegistry added in v0.15.0

func ProvidePrometheusRegistry() *prometheus.Registry

ProvidePrometheusRegistry is a wire provider for a prometheus registry.

func ProvideServerConfig

func ProvideServerConfig(bootstrapLogger BootstrapLogger) config.Server

ProvideServerConfig is a wire provider for config.Server.

Types

type App

type App struct {
	Config          config.Server
	Fiber           *fiber.App
	Logger          zerolog.Logger
	PromLogger      promhttp.Logger
	PromRegistry    *prometheus.Registry
	TeardownService teardown.Service
	// contains filtered or unexported fields
}

App holds data used at runtime by main package.

func ProvideApp

func ProvideApp(
	app *fiber.App,
	cfg config.Server,
	logger zerolog.Logger,
	promLogger promhttp.Logger,
	promRegistry *prometheus.Registry,
	setup Setup,
	teardownService teardown.Service,
) App

ProvideApp is a wire provider for App.

type BootstrapLogger

type BootstrapLogger zerolog.Logger

BootstrapLogger define zerolog loggers used before ProvideLogger.

type MinimalFiber

type MinimalFiber *fiber.App

func ProvideMinimalFiber

func ProvideMinimalFiber(
	accessLogMiddleware middlewares.AccessLog,
	errorHandlerMiddleware middlewares.ErrorHandler,
	fiberCfg fiber.Config,
	healthcheckHandler handlers.HealhCheck,
	logger zerolog.Logger,
	requestIdMiddleware middlewares.RequestId,
	staticMiddleware middlewares.Static,
	metricsMiddleware middlewares.Metrics,
	teardownService teardown.Service,
) MinimalFiber

ProvideMinimalFiber is a wire provider for a minimally configured fiber.App with no route.

type Setup

type Setup struct{}

func ProvideSetup

func ProvideSetup() Setup

ProvideSetup is a wire provider for setup.

Jump to

Keyboard shortcuts

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