http

package
v0.0.0-...-ef901e4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServer

func CreateServer(mainContext context.Context, deps *ServerDependencies) http.Handler

CreateServer creates server (http.Handler) instance.

func InitEndpoints

func InitEndpoints(mainCtx context.Context, rt *router.Router, deps *ServerDependencies)

InitEndpoints registers endpoints of the DSPS server

func StartServer

func StartServer(mainContext context.Context, deps *ServerDependencies)

StartServer starts HTTP web server

Types

type ServerDependencies

type ServerDependencies struct {
	Config          *config.ServerConfig
	ChannelProvider domain.ChannelProvider
	Storage         domain.Storage

	Telemetry   *telemetry.Telemetry
	Sentry      sentry.Sentry
	LogFilter   *logger.Filter
	ServerClose lifecycle.ServerClose
}

ServerDependencies struct holds all resource references to build web server

func (*ServerDependencies) DiscloseAuthRejectionDetail

func (deps *ServerDependencies) DiscloseAuthRejectionDetail() bool

DiscloseAuthRejectionDetail returns configuration value

func (*ServerDependencies) GetAdminAuthConfig

func (deps *ServerDependencies) GetAdminAuthConfig() *config.AdminAuthConfig

GetAdminAuthConfig returns configuration value

func (*ServerDependencies) GetChannelProvider

func (deps *ServerDependencies) GetChannelProvider() domain.ChannelProvider

GetChannelProvider returns ChannelProvider object

func (*ServerDependencies) GetDefaultHeaders

func (deps *ServerDependencies) GetDefaultHeaders() map[string]string

GetDefaultHeaders returns default response headers config

func (*ServerDependencies) GetIPHeaderName

func (deps *ServerDependencies) GetIPHeaderName() string

GetIPHeaderName returns configuration value

func (*ServerDependencies) GetLogFilter

func (deps *ServerDependencies) GetLogFilter() *logger.Filter

GetLogFilter returns log filter instance

func (*ServerDependencies) GetLongPollingMaxTimeout

func (deps *ServerDependencies) GetLongPollingMaxTimeout() domain.Duration

GetLongPollingMaxTimeout returns configuration value

func (*ServerDependencies) GetSentry

func (deps *ServerDependencies) GetSentry() sentry.Sentry

GetSentry returns sentry facility

func (*ServerDependencies) GetServerClose

func (deps *ServerDependencies) GetServerClose() lifecycle.ServerClose

GetServerClose returns ServerClose instance

func (*ServerDependencies) GetStorage

func (deps *ServerDependencies) GetStorage() domain.Storage

GetStorage returns Storage instance

func (*ServerDependencies) GetTelemetry

func (deps *ServerDependencies) GetTelemetry() *telemetry.Telemetry

GetTelemetry returns telemetry facility

func (*ServerDependencies) GetTrustedProxyRanges

func (deps *ServerDependencies) GetTrustedProxyRanges() []domain.CIDR

GetTrustedProxyRanges returns configuration value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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