Documentation ¶
Overview ¶
Package wired contains wire provider for external dependencies or code shared between Prisme mode.
Index ¶
- func ProvideClickhouseConfig(bootstrapLogger BootstrapLogger) config.Clickhouse
- func ProvideFiber(apiEventsTimeoutMiddleware middlewares.ApiEventsTimeout, ...) *fiber.App
- func ProvideFiberStorage() storage.Storage
- func ProvideGrafanaConfig(bootstrapLogger BootstrapLogger) config.Grafana
- func ProvideLogger(cfg config.Server) zerolog.Logger
- func ProvideMinimalFiberConfig(cfg config.Server) fiber.Config
- func ProvidePromHttpLogger(cfg config.Server, logger zerolog.Logger) promhttp.Logger
- func ProvidePrometheusRegistry() *prometheus.Registry
- func ProvideServerConfig(bootstrapLogger BootstrapLogger) config.Server
- type App
- type BootstrapLogger
- type MinimalFiber
- type Setup
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 ¶ added in v0.18.0
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
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 ¶
ProvideLogger is a wire provider for zerolog.Logger.
func ProvideMinimalFiberConfig ¶ added in v0.10.0
ProvideMinimalFiberConfig is a wire provider for fiber configuration.
func ProvidePromHttpLogger ¶ added in v0.15.0
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.
type BootstrapLogger ¶
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.