actions

package
v0.0.0-...-c7b99b7 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 22 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 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.

Routing, middleware, groups, etc... are declared TOP -> DOWN. This means if you add a middleware to `app` *after* declaring a group, that group will NOT have that new middleware. The same is true of resource declarations as well.

It also means that routes are checked in the order they are declared. `ServeFiles` is a CATCH-ALL route, so it should always be placed last in the route declarations, as it will prevent routes declared after it to never be called.

func AuthCreate

func AuthCreate(c buffalo.Context) error

AuthCreate attempts to log the user in with an existing account.

func AuthDestroy

func AuthDestroy(c buffalo.Context) error

AuthDestroy clears the session and logs a user out

func AuthLanding

func AuthLanding(c buffalo.Context) error

AuthLanding shows a landing page to login

func AuthNew

func AuthNew(c buffalo.Context) error

AuthNew loads the signin page

func Authorize

func Authorize(next buffalo.Handler) buffalo.Handler

Authorize require a user be logged in before accessing a route

func CapCreate

func CapCreate(c buffalo.Context) error

func CapsView

func CapsView(c buffalo.Context) error

func CreateGroup

func CreateGroup(c buffalo.Context) error

GroupsCreate

func DestroyCap

func DestroyCap(c buffalo.Context) error

func DestroyField

func DestroyField(c buffalo.Context) error

Destroy deletes a Field from the DB. This function is mapped to the path DELETE /fields/{field_id}

func GroupShow

func GroupShow(c buffalo.Context) error

func GroupsNew

func GroupsNew(c buffalo.Context) error

GroupsNew default implementation.

func GroupsShow

func GroupsShow(c buffalo.Context) error

GroupsShow default implementation.

func HomeHandler

func HomeHandler(c buffalo.Context) error

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

func ListRoutes

func ListRoutes(c buffalo.Context) error

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 ShowFields

func ShowFields(c buffalo.Context) error

List gets all Fields. This function is mapped to the path GET /fields

func UsersActivate

func UsersActivate(c buffalo.Context) error

func UsersCreate

func UsersCreate(c buffalo.Context) error

UsersCreate registers a new user with the application.

func UsersNew

func UsersNew(c buffalo.Context) error

UsersNew renders the users form

Types

This section is empty.

Jump to

Keyboard shortcuts

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