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 JSONFeed(c buffalo.Context) error
- func Privacy(c buffalo.Context) error
- func RSSFeed(c buffalo.Context) error
- func SetCurrentUser(next buffalo.Handler) buffalo.Handler
- type PostsResource
- func (v PostsResource) Create(c buffalo.Context) error
- func (v PostsResource) Destroy(c buffalo.Context) error
- func (v PostsResource) Edit(c buffalo.Context) error
- func (v PostsResource) List(c buffalo.Context) error
- func (v PostsResource) New(c buffalo.Context) error
- func (v PostsResource) Show(c buffalo.Context) error
- func (v PostsResource) Update(c buffalo.Context) error
- type UsersResource
- func (v UsersResource) Create(c buffalo.Context) error
- func (v UsersResource) Destroy(c buffalo.Context) error
- func (v UsersResource) Edit(c buffalo.Context) error
- func (v UsersResource) List(c buffalo.Context) error
- func (v UsersResource) New(c buffalo.Context) error
- func (v UsersResource) Show(c buffalo.Context) error
- func (v UsersResource) 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 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.
func AuthCallback ¶
AuthCallback handles Provider callbacks
func HomeHandler ¶
HomeHandler is a default handler to serve up a home page.
Types ¶
type PostsResource ¶
PostsResource is the resource for the post model
func (PostsResource) Create ¶
func (v PostsResource) Create(c buffalo.Context) error
Create adds a post to the DB. This function is mapped to the path POST /posts
func (PostsResource) Destroy ¶
func (v PostsResource) Destroy(c buffalo.Context) error
Destroy deletes a post from the DB. This function is mapped to the path DELETE /posts/{post_id}
func (PostsResource) Edit ¶
func (v PostsResource) Edit(c buffalo.Context) error
Edit renders a edit formular for a post. This function is mapped to the path GET /posts/{post_id}/edit
func (PostsResource) List ¶
func (v PostsResource) List(c buffalo.Context) error
List gets all Posts. This function is mapped to the path GET /posts
func (PostsResource) New ¶
func (v PostsResource) New(c buffalo.Context) error
New renders the formular for creating a new post. This function is mapped to the path GET /posts/new
type UsersResource ¶
UsersResource is the resource for the user model
func (UsersResource) Create ¶
func (v UsersResource) Create(c buffalo.Context) error
Create adds a user to the DB. This function is mapped to the path POST /users
func (UsersResource) Destroy ¶
func (v UsersResource) Destroy(c buffalo.Context) error
Destroy deletes a user from the DB. This function is mapped to the path DELETE /users/{user_id}
func (UsersResource) Edit ¶
func (v UsersResource) Edit(c buffalo.Context) error
Edit renders a edit formular for a user. This function is mapped to the path GET /users/{user_id}/edit
func (UsersResource) List ¶
func (v UsersResource) List(c buffalo.Context) error
List gets all Users. This function is mapped to the path GET /users
func (UsersResource) New ¶
func (v UsersResource) New(c buffalo.Context) error
New renders the formular for creating a new user. This function is mapped to the path GET /users/new