ctlutil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttendeeIdFromVars

func AttendeeIdFromVars(ctx context.Context, w http.ResponseWriter, r *http.Request) (uint, error)

func AttendeeNotFoundErrorHandler

func AttendeeNotFoundErrorHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, id uint)

func ErrorHandler

func ErrorHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, msg string, status int, details url.Values)

func InvalidAttendeeIdErrorHandler

func InvalidAttendeeIdErrorHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, id string)

func UnauthenticatedError

func UnauthenticatedError(ctx context.Context, w http.ResponseWriter, r *http.Request, details string, logMessage string)

func UnauthorizedError

func UnauthorizedError(ctx context.Context, w http.ResponseWriter, r *http.Request, details string, logMessage string)

func WriteJson

func WriteJson(ctx context.Context, w http.ResponseWriter, v interface{})

WriteJson will also finalize the request, so if you don't want to return status 200, call WriteHeader first.

Types

This section is empty.

Jump to

Keyboard shortcuts

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