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: 0

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