fixtures

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

README

fixtures

import "github.com/coralproject/shelf/cmd/corald/fixtures"

Overview

Index

Package files

fixtures.go

func Error

func Error(err error) web.Handler

Error will simply return the error to the calling request stack.

func Handler

func Handler(name string, code int) web.Handler

Handler will serve a JSON payload as the endpoint response.

func Load

func Load(name string, v interface{}) error

Load unmarshals the specified fixture into the provided data value.

func NoContent

func NoContent(c *web.Context) error

NoContent simply responds with a HTTP Status Code of 204.


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error) web.Handler

Error will simply return the error to the calling request stack.

func Handler

func Handler(name string, code int) web.Handler

Handler will serve a JSON payload as the endpoint response.

func Load

func Load(name string, v interface{}) error

Load unmarshals the specified fixture into the provided data value.

func NoContent

func NoContent(c *web.Context) error

NoContent simply responds with a HTTP Status Code of 204.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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