Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTemplate ¶
func RenderTemplate(w http.ResponseWriter, templateName string, data interface{})
Types ¶
type AHandler ¶
type AHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(method string, path string, controller Controller) *AHandler
func (*AHandler) HandleRequest ¶
func (handler *AHandler) HandleRequest(w http.ResponseWriter, r *http.Request)
type ARouter ¶
type ARouter struct {
// contains filtered or unexported fields
}
func (*ARouter) AddHandler ¶
func (*ARouter) SetHandlers ¶
type Controller ¶
type Router ¶
type Router interface {
// routes the given request to a controller
GetController(*http.Request) Controller
// routes a request to its appropriate handler
Route(*http.Request)
}
type Viewer ¶
type Viewer interface {
// takes an arbitrary struct and writes a
// representation of it to the the http response
Render(http.ResponseWriter, interface{})
}
Click to show internal directories.
Click to hide internal directories.