svc

package
v1.99.99 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const JSON = "application/json"

JSON is the MIME type that we process

Variables

This section is empty.

Functions

func LogMW

func LogMW(handler http.Handler, logger logrus.FieldLogger) http.HandlerFunc

LogMW wraps a regular handler and replaces the writer with some logging middleware.

func New

func New(cf cfg.Cfg) *boneful.Service

New returns a new boneful Service with routes.

func NewLogMux

func NewLogMux(cf cfg.Cfg) http.HandlerFunc

NewLogMux returns a new boneful service with all of our routes and logging middleware.

Types

type LogWriter

type LogWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

LogWriter proxies http.ResponseWriter and logs.

func (*LogWriter) Write

func (w *LogWriter) Write(b []byte) (int, error)

WriteHeader proxies http.ResponseWriter.Write

func (*LogWriter) WriteHeader

func (w *LogWriter) WriteHeader(status int)

WriteHeader proxies http.ResponseWriter.WriteHeader

Jump to

Keyboard shortcuts

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