xrest

package module
v0.0.0-...-f3a3c3f Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2016 License: MIT Imports: 2 Imported by: 0

README

xrest

JSON Restful API with context.Context in mind.

Plug structure

Image of Plug

TODO
  • add realtime plug (like phoenix channel)
  • add docs
  • add a project site (github pages)
  • add a guide
  • add session plug
  • add more...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	ServeHTTP(context.Context, http.ResponseWriter, *http.Request)
}

type HandlerFunc

type HandlerFunc func(context.Context, http.ResponseWriter, *http.Request)

func (HandlerFunc) Plug

func (h HandlerFunc) Plug(_ Handler) Handler

func (HandlerFunc) ServeHTTP

func (h HandlerFunc) ServeHTTP(ctx context.Context, w http.ResponseWriter, r *http.Request)

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline() *Pipeline

func (*Pipeline) HTTPHandler

func (p *Pipeline) HTTPHandler() http.Handler

func (*Pipeline) Handler

func (p *Pipeline) Handler() Handler

func (*Pipeline) Plug

func (p *Pipeline) Plug(plugs ...Plugger) *Pipeline

func (*Pipeline) Plugs

func (p *Pipeline) Plugs() []Plugger

func (*Pipeline) SetHandler

func (p *Pipeline) SetHandler(h Handler) *Pipeline

type Plugger

type Plugger interface {
	Plug(Handler) Handler
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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