actions

package
v0.0.0-...-7ab16a1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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".

Functions

func AdminRequired

func AdminRequired(next buffalo.Handler) buffalo.Handler

AdminRequired requires a user to be logged in and to be an admin before accessing a route.

func App

func App() *buffalo.App

App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.

func CommentsCreatePost

func CommentsCreatePost(c buffalo.Context) error

CommentsCreatePost adds the comment to the db.

func CommentsDelete

func CommentsDelete(c buffalo.Context) error

CommentsDelete deletes the comment from the db.

func CommentsEditGet

func CommentsEditGet(c buffalo.Context) error

CommentsEditGet displays a form to edit a comment.

func CommentsEditPost

func CommentsEditPost(c buffalo.Context) error

CommentsEditPost process the edit form of a comment.

func HomeHandler

func HomeHandler(c buffalo.Context) error

HomeHandler is a default handler to serve up a home page.

func LoginRequired

func LoginRequired(next buffalo.Handler) buffalo.Handler

func PostsCreateGet

func PostsCreateGet(c buffalo.Context) error

PostsCreateGet displays a form to create a post

func PostsCreatePost

func PostsCreatePost(c buffalo.Context) error

PostsCreatePost adds a new Post to the db

func PostsDelete

func PostsDelete(c buffalo.Context) error

PostsDelete deletes a post from the db

func PostsDetail

func PostsDetail(c buffalo.Context) error

PostsDetail displays a single post.

func PostsEditGet

func PostsEditGet(c buffalo.Context) error

PostsEditGet displays a form to edit the post.

func PostsEditPost

func PostsEditPost(c buffalo.Context) error

PostsEditPost updates a post.

func PostsIndex

func PostsIndex(c buffalo.Context) error

PostsIndex default implementation.

func SetCurrentUser

func SetCurrentUser(next buffalo.Handler) buffalo.Handler

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

func UsersLoginGet(c buffalo.Context) error

UsersLoginGet displays a login form

func UsersLoginPost

func UsersLoginPost(c buffalo.Context) error

UsersLoginPost logs in a user.

func UsersLogout

func UsersLogout(c buffalo.Context) error

UsersLogout clears the session and logs out the user.

func UsersRegisterGet

func UsersRegisterGet(c buffalo.Context) error

UserRegisterGet displays a register form

func UsersRegisterPost

func UsersRegisterPost(c buffalo.Context) error

UsersRegisterPost adds a User to the DB. This function is mapped to the path POST /accounts/register

Types

This section is empty.

Jump to

Keyboard shortcuts

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