endpoints

package
v0.0.0-...-a6af74b Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJSON

func WriteJSON(data interface{}, w http.ResponseWriter) bool

WriteJSON data to a response writer returns false in case it wrote an error instead of the data

Types

type Service

type Service interface {
	// Serve an endpoint and return if it was successfull
	Serve(path string, w http.ResponseWriter, r *http.Request) bool
	// Close any open connections
	Close() error
}

Service defines a simplistic per-endpoint service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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