Documentation ¶
Overview ¶
Package ion implements a small web framework that allows to easily connect reusable components.
This framework is based on https://blog.gopheracademy.com/advent-2016/go-syntax-for-dsls/ idea of using a DSL. This approach naturally removes the need to implement a router, allowing the framework to just reuse Go standard mux.
Ion have the following features:
- Can use easily any http.Handler or http.HandlerFunc - Easily describe paths (with arguments) and method handlers - Compatible with Middlewares - Use context for passing path arguments
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint struct { Middleware []Middleware Handler Builder HttpHandler http.Handler }
Endpoint describes a http request handler, that may have optional Middleware
type Methods ¶
Methods implement an http.Handler that handles requests according to the request method.
type Middleware ¶
Middleware is a function that wrap an http.Handler and returns a value that implements the http.Handler interface
Directories ¶
Path | Synopsis |
---|---|
components
|
|
router
Package router contains a flexible router, with integrated context management per request
|
Package router contains a flexible router, with integrated context management per request |
examples
|
|
Package futures allow adding incomplete computations in contexts and templates.
|
Package futures allow adding incomplete computations in contexts and templates. |
Package middleware contains general purpose middleware.
|
Package middleware contains general purpose middleware. |
hotcache
Package hotcache intercepts and group equal requests, perform a single server request.
|
Package hotcache intercepts and group equal requests, perform a single server request. |