Documentation
¶
Index ¶
- Variables
- func App() *buffalo.App
- func AuthCallback(c buffalo.Context) error
- func AuthDestroy(c buffalo.Context) error
- func Authorize(next buffalo.Handler) buffalo.Handler
- func HomeHandler(c buffalo.Context) error
- func LoginHandler(c buffalo.Context) error
- func ProfileHandler(c buffalo.Context) error
- func ReactHandler(c buffalo.Context) error
- func SetCurrentUser(next buffalo.Handler) buffalo.Handler
- func UpdateProfileHandler(c buffalo.Context) error
- func UserDestroy(c buffalo.Context) error
- type ContactsResource
- func (v ContactsResource) Create(c buffalo.Context) error
- func (v ContactsResource) Destroy(c buffalo.Context) error
- func (v ContactsResource) Edit(c buffalo.Context) error
- func (v ContactsResource) List(c buffalo.Context) error
- func (v ContactsResource) New(c buffalo.Context) error
- func (v ContactsResource) Show(c buffalo.Context) error
- func (v ContactsResource) Update(c buffalo.Context) error
- type WidgetsResource
- func (v WidgetsResource) Create(c buffalo.Context) error
- func (v WidgetsResource) Destroy(c buffalo.Context) error
- func (v WidgetsResource) Edit(c buffalo.Context) error
- func (v WidgetsResource) List(c buffalo.Context) error
- func (v WidgetsResource) New(c buffalo.Context) error
- func (v WidgetsResource) Show(c buffalo.Context) error
- func (v WidgetsResource) Update(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
T is a translator used for internationalization
Functions ¶
func App ¶
App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.
func AuthCallback ¶
AuthCallback returned after goth finishes user authentication saves new user and profile to database
func AuthDestroy ¶
AuthDestroy implements logout functionality
func HomeHandler ¶
HomeHandler is a default handler to serve up a home page.
func LoginHandler ¶
LoginHandler is a default handler to serve up a home page.
func ProfileHandler ¶
ProfileHandler is a default handler to serve up a profile page.
func ReactHandler ¶
ReactHandler is a default handler to serve up a home page. TODO
func SetCurrentUser ¶
SetCurrentUser is a middleware which adds current_user info to the incoming request
func UpdateProfileHandler ¶
UpdateProfileHandler is a default handler to serve up a profile page.
func UserDestroy ¶
UserDestroy deletes a User from the DB. This function is mapped to the path DELETE /users/{user_id}
Types ¶
type ContactsResource ¶
ContactsResource is the resource for the Contact model
func (ContactsResource) Create ¶
func (v ContactsResource) Create(c buffalo.Context) error
Create adds a Contact to the DB. This function is mapped to the path POST /contacts
func (ContactsResource) Destroy ¶
func (v ContactsResource) Destroy(c buffalo.Context) error
Destroy deletes a Contact from the DB. This function is mapped to the path DELETE /contacts/{contact_id}
func (ContactsResource) Edit ¶
func (v ContactsResource) Edit(c buffalo.Context) error
Edit renders a edit form for a Contact. This function is mapped to the path GET /contacts/{contact_id}/edit
func (ContactsResource) List ¶
func (v ContactsResource) List(c buffalo.Context) error
List gets all Contacts. This function is mapped to the path GET /contacts
func (ContactsResource) New ¶
func (v ContactsResource) New(c buffalo.Context) error
New renders the form for creating a new Contact. This function is mapped to the path GET /contacts/new
type WidgetsResource ¶
WidgetsResource is the resource for the Widget model
func (WidgetsResource) Create ¶
func (v WidgetsResource) Create(c buffalo.Context) error
Create adds a Widget to the DB. This function is mapped to the path POST /widgets
func (WidgetsResource) Destroy ¶
func (v WidgetsResource) Destroy(c buffalo.Context) error
Destroy deletes a Widget from the DB. This function is mapped to the path DELETE /widgets/{widget_id}
func (WidgetsResource) Edit ¶
func (v WidgetsResource) Edit(c buffalo.Context) error
Edit renders a edit form for a Widget. This function is mapped to the path GET /widgets/{widget_id}/edit
func (WidgetsResource) List ¶
func (v WidgetsResource) List(c buffalo.Context) error
List gets all Widgets. This function is mapped to the path GET /widgets
func (WidgetsResource) New ¶
func (v WidgetsResource) New(c buffalo.Context) error
New renders the form for creating a new Widget. This function is mapped to the path GET /widgets/new