hyperdrive

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2017 License: MIT Imports: 3 Imported by: 0

README

hyperdrive

An opinionated microframework for creating hypermedia APIs in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Router *mux.Router
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI() API

func (*API) AddEndpoint

func (api *API) AddEndpoint(e Endpointer)

type DeleteHandler

type DeleteHandler interface {
	Delete(http.ResponseWriter, *http.Request)
}

type Endpoint

type Endpoint struct {
	Name string
	Desc string
	Path string
}

func NewEndpoint

func NewEndpoint(name string, desc string, path string) *Endpoint

func (*Endpoint) GetDesc

func (e *Endpoint) GetDesc() string

func (*Endpoint) GetName

func (e *Endpoint) GetName() string

func (*Endpoint) GetPath

func (e *Endpoint) GetPath() string

type Endpointer

type Endpointer interface {
	GetName() string
	GetDesc() string
	GetPath() string
}

type GetHandler

type GetHandler interface {
	Get(http.ResponseWriter, *http.Request)
}

type OptionsHandler

type OptionsHandler interface {
	Options(http.ResponseWriter, *http.Request)
}

type PatchHandler

type PatchHandler interface {
	Patch(http.ResponseWriter, *http.Request)
}

type PostHandler

type PostHandler interface {
	Post(http.ResponseWriter, *http.Request)
}

type PutHandler

type PutHandler interface {
	Put(http.ResponseWriter, *http.Request)
}

Jump to

Keyboard shortcuts

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