controller

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecoderErr added in v0.19.0

func DecoderErr(err error) error

DecoderErr handles an error returned by json.NewDecoder(r.Body).Decode(&data) this function will determine the appropriate error response

Types

type StandardResponse added in v0.19.0

type StandardResponse struct {
	Path      string      `json:"path,omitempty"`
	RequestID string      `json:"request_id,omitempty"`
	Data      interface{} `json:"data"`
}

StandardResponse is meant to be included in all response bodies and includes "standard" response fields

func NewStandardResponse added in v0.19.0

func NewStandardResponse(r *http.Request, d interface{}) (*StandardResponse, error)

NewStandardResponse is an initializer for the StandardResponse struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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