result

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package result implements utilities for writing different data formats to http.ResponseWriter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONError

func JSONError(w http.ResponseWriter, b *JSONErrorBody)

JSONError writes json error message wth specified http return code represented by JSONErrorBody to given http.ResponseWriter.

Types

type JSONErrorBody

type JSONErrorBody struct {
	Code    int    `json:"code"`
	Type    string `json:"type"`
	Message string `json:"message"`
}

JSONErrorBody implements arguments for JSONError function.

Jump to

Keyboard shortcuts

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