Documentation ¶
Index ¶
- Variables
- func App() *buffalo.App
- func AuthCreate(c buffalo.Context) error
- func AuthDestroy(c buffalo.Context) error
- func AuthLanding(c buffalo.Context) error
- func AuthNew(c buffalo.Context) error
- func Authorize(next buffalo.Handler) buffalo.Handler
- func CapCreate(c buffalo.Context) error
- func CapsView(c buffalo.Context) error
- func CreateGroup(c buffalo.Context) error
- func DestroyCap(c buffalo.Context) error
- func DestroyField(c buffalo.Context) error
- func GroupShow(c buffalo.Context) error
- func GroupsNew(c buffalo.Context) error
- func GroupsShow(c buffalo.Context) error
- func HomeHandler(c buffalo.Context) error
- func ListRoutes(c buffalo.Context) error
- func SetCurrentUser(next buffalo.Handler) buffalo.Handler
- func ShowFields(c buffalo.Context) error
- func UsersActivate(c buffalo.Context) error
- func UsersCreate(c buffalo.Context) error
- func UsersNew(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 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 ¶
AuthCreate attempts to log the user in with an existing account.
func AuthDestroy ¶
AuthDestroy clears the session and logs a user out
func AuthLanding ¶
AuthLanding shows a landing page to login
func DestroyCap ¶
func DestroyField ¶
Destroy deletes a Field from the DB. This function is mapped to the path DELETE /fields/{field_id}
func HomeHandler ¶
HomeHandler is a default handler to serve up a home page.
func ListRoutes ¶
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 ShowFields ¶
List gets all Fields. This function is mapped to the path GET /fields
func UsersActivate ¶
func UsersCreate ¶
UsersCreate registers a new user with the application.
Types ¶
This section is empty.