responses

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

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	StatusCode   safehttp.StatusCode
	ErrorMessage safehtml.HTML
}

Error is a safe error response.

func NewError

func NewError(code safehttp.StatusCode, message safehtml.HTML) Error

NewError creates a new error response.

func (Error) Code

func (e Error) Code() safehttp.StatusCode

Code returns the HTTP response code.

func (Error) Message

func (e Error) Message() safehtml.HTML

Message returns the HTTP response message.

Jump to

Keyboard shortcuts

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