package
0.0.0-20240917120716-8843776e9f3a
Repository: https://github.com/cossacklabs/acra.git
Documentation: pkg.go.dev

# Functions

AddHTTPServerSubscriber register callback to HTTP server.
NewHTTPError return new initialized HTTPError.
NewHTTPService return new initialized http service that ready to process new connections.
OnHTTPServerInit call all registered callbacks on HTTP server initialization.
RespondWithError encode error to proper response format and write to client using ctx.
WithConnectionContextHandler return new option that registers http.Server.ConnContext handler for http.Server.
WithContext return option that configures HTTPService with specified context.

# Structs

HTTPError store HTTP response status and message.
HTTPService implements HTTP API v1 and REST API v2 using ITranslatorService as logic backend.

# Interfaces

HTTPServerSubscriber interface declares callbacks raised by HTTP server.

# Type aliases

ServiceOption to configure HTTPService.