controllers

package
v0.0.0-...-c941272 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddComment

func AddComment(db *mgo.Database, r render.Render, comment models.Comment, p martini.Params)

Called on a POST to /events/:id/comments Assuming valid comment; Adds the comment under the given id

func AddEvent

func AddEvent(db *mgo.Database, r render.Render, event models.Event)

Called on a POST to /events Assuming valid event; adds the given event

func GetAllComments

func GetAllComments(db *mgo.Database, r render.Render, p martini.Params)

Called on a GET to /events/:id/comments Returns list of all comments under :id

func GetAllEvents

func GetAllEvents(db *mgo.Database, r render.Render)

Called on a GET to /events Returns a list of all events

func GetEvent

func GetEvent(db *mgo.Database, r render.Render, p martini.Params)

Called on a Get to /events/:id Returns a single event with the id :id

func GetLoggedInUser

func GetLoggedInUser(tokens oauth2.Tokens, r render.Render) (int, string)

Get the logged in user

Types

This section is empty.

Jump to

Keyboard shortcuts

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