handlers

package
v0.0.0-...-8f5c598 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Posts AdminPosts
}

func (Admin) Index

func (a Admin) Index(r render.Render)

Index returns the admin dashboard.

type AdminPosts

type AdminPosts struct{}

func (AdminPosts) Edit

func (ap AdminPosts) Edit(params martini.Params, r render.Render)

Edit loads a post for editing.

func (AdminPosts) Index

func (ap AdminPosts) Index(r render.Render)

Index lists all posts.

func (AdminPosts) New

func (ap AdminPosts) New(r render.Render)

New allows for adding new posts.

type Api

type Api struct {
	Posts  ApiPosts
	Render ApiRender
}

func (Api) Index

func (a Api) Index(r *http.Request, rw http.ResponseWriter) string

Index returns the api's index.

type ApiPosts

type ApiPosts struct{}

func (ApiPosts) Create

func (ap ApiPosts) Create(r render.Render, req *http.Request)

Create allows for the creation of new posts. It returns a 204 response on creation or a 500 response on error.

func (ApiPosts) Index

func (ap ApiPosts) Index(r render.Render)

Index returns all available posts.

func (ApiPosts) Show

func (ap ApiPosts) Show(params martini.Params, r render.Render)

Show returns a single post.

type ApiRender

type ApiRender struct{}

func (ApiRender) Markdown

func (ap ApiRender) Markdown(r render.Render, req *http.Request)

Markdown renders a POST request into HTML.

Jump to

Keyboard shortcuts

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