utils

package
v0.0.0-...-3333eaa Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package utils has common utility methods that components can use for structuring http responses of their endpoints

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection(r *http.Request) net.Conn

GetConnection returns the connection for the request

func SetJSONError

func SetJSONError(w http.ResponseWriter, err error, errorCode int)

SetJSONError writes a server error as JSON with the correct http error code

Types

This section is empty.

Directories

Path Synopsis
Package stream has api stream utility methods that components can use for directing output to a stream receiver
Package stream has api stream utility methods that components can use for directing output to a stream receiver

Jump to

Keyboard shortcuts

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