Documentation ¶
Index ¶
- Variables
- func AdminRequired(next buffalo.Handler) buffalo.Handler
- func App() *buffalo.App
- func CommentsCreatePost(c buffalo.Context) error
- func CommentsDelete(c buffalo.Context) error
- func CommentsEditGet(c buffalo.Context) error
- func CommentsEditPost(c buffalo.Context) error
- func HomeHandler(c buffalo.Context) error
- func LoginRequired(next buffalo.Handler) buffalo.Handler
- func PostsCreateGet(c buffalo.Context) error
- func PostsCreatePost(c buffalo.Context) error
- func PostsDelete(c buffalo.Context) error
- func PostsDetail(c buffalo.Context) error
- func PostsEditGet(c buffalo.Context) error
- func PostsEditPost(c buffalo.Context) error
- func PostsIndex(c buffalo.Context) error
- func SetCurrentUser(next buffalo.Handler) buffalo.Handler
- func UsersLoginGet(c buffalo.Context) error
- func UsersLoginPost(c buffalo.Context) error
- func UsersLogout(c buffalo.Context) error
- func UsersRegisterGet(c buffalo.Context) error
- func UsersRegisterPost(c buffalo.Context) error
Constants ¶
This section is empty.
Variables ¶
var ENV = envy.Get("GO_ENV", "development")
ENV is used to help switch settings based on where the application is being run. Default is "development".
var T *i18n.Translator
Functions ¶
func AdminRequired ¶
AdminRequired requires a user to be logged in and to be an admin before accessing a route.
func App ¶
App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.
func CommentsCreatePost ¶
CommentsCreatePost adds the comment to the db.
func CommentsDelete ¶
CommentsDelete deletes the comment from the db.
func CommentsEditGet ¶
CommentsEditGet displays a form to edit a comment.
func CommentsEditPost ¶
CommentsEditPost process the edit form of a comment.
func HomeHandler ¶
HomeHandler is a default handler to serve up a home page.
func PostsCreateGet ¶
PostsCreateGet displays a form to create a post
func PostsCreatePost ¶
PostsCreatePost adds a new Post to the db
func PostsEditGet ¶
PostsEditGet displays a form to edit the post.
func SetCurrentUser ¶
SetCurrentUser attempts to find a user based on the current_user_id in the session. If one is found it is set on the context.
func UsersLoginGet ¶
UsersLoginGet displays a login form
func UsersLogout ¶
UsersLogout clears the session and logs out the user.
func UsersRegisterGet ¶
UserRegisterGet displays a register form
func UsersRegisterPost ¶
UsersRegisterPost adds a User to the DB. This function is mapped to the path POST /accounts/register
Types ¶
This section is empty.