api

package
v0.0.0-...-21d0996 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger *zerolog.Logger, listener net.Listener) *server.Server

NewServer creates a new server.

Types

type ResponseRecorder

type ResponseRecorder struct {
	http.ResponseWriter
	Status int
}

ResponseRecorder is a custom ResponseWriter that captures the status code.

func NewResponseRecorder

func NewResponseRecorder(w http.ResponseWriter) *ResponseRecorder

NewResponseRecorder creates a new ResponseRecorder.

func (*ResponseRecorder) WriteHeader

func (r *ResponseRecorder) WriteHeader(status int)

WriteHeader captures the status code.

Jump to

Keyboard shortcuts

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