handlers

package
v0.0.0-...-4c8f420 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiHandler

func ApiHandler(cfg *config.Config, log *logger.AppLogger, rs *resolvers.RootResolver) http.Handler

ApiHandler constructs and return the API HTTP handlers chain for serving GraphQL API calls.

func GraphiHandler

func GraphiHandler(address string, log logger.AppLogger) http.Handler

GraphiHandler builds a HTTP handler function for GraphiQL playground.

Types

type LoggingHandler

type LoggingHandler struct {
	// contains filtered or unexported fields
}

LoggingHandler defines HTTP handler middleware for logging incoming communication through provided Logger.

func (*LoggingHandler) ServeHTTP

func (h *LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles incoming request by creating a log record with predefined request details and passing it to the next handler in the chain.

Jump to

Keyboard shortcuts

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