http

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense Imports: 30 Imported by: 0

Documentation

Overview

Package server provides an HTTP server comprised of multiple HTTP services

Index

Constants

This section is empty.

Variables

View Source
var ProvidersHTTP = wire.NewSet(
	ProvideHTTPServer,
)

ProvidersHTTP are our wire superset of providers this package offers.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTPSCertificateFile    string        `json:"httpsCertificate,omitempty"    toml:"https_certificate,omitempty"`
	HTTPSCertificateKeyFile string        `json:"httpsCertificateKey,omitempty" toml:"https_certificate_key,omitempty"`
	StartupDeadline         time.Duration `json:"startupDeadline,omitempty"     toml:"startup_deadline,omitempty"`
	HTTPPort                uint16        `json:"httpPort"                      toml:"http_port,omitempty"`
	Debug                   bool          `json:"debug"                         toml:"debug,omitempty"`
	// contains filtered or unexported fields
}

Config describes the settings pertinent to the HTTP serving portion of the service.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

type Server

type Server interface {
	Serve()
	Shutdown(context.Context) error
	Router() routing.Router
}

func ProvideHTTPServer

func ProvideHTTPServer(
	ctx context.Context,
	serverSettings Config,
	dataManager database.DataManager,
	logger logging.Logger,
	encoder encoding.ServerEncoderDecoder,
	router routing.Router,
	tracerProvider tracing.TracerProvider,
	authService types.AuthService,
	usersService types.UserDataService,
	accountsService types.AccountDataService,
	accountInvitationsService types.AccountInvitationDataService,
	webhooksService types.WebhookDataService,
	adminService types.AdminService,
	serviceSettingDataService types.ServiceSettingDataService,
	serviceSettingConfigurationsService types.ServiceSettingConfigurationDataService,
	oauth2ClientDataService types.OAuth2ClientDataService,
	userNotificationsService types.UserNotificationDataService,
	auditLogService types.AuditLogEntryDataService,
) (Server, error)

ProvideHTTPServer builds a new server instance.

Directories

Path Synopsis
Package build contains a builder func for the HTTP server generated by dependency injection tools.
Package build contains a builder func for the HTTP server generated by dependency injection tools.

Jump to

Keyboard shortcuts

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