Documentation ¶
Index ¶
- Variables
- func App() *buffalo.App
- type UsersResource
- func (ur *UsersResource) Create(c buffalo.Context) error
- func (ur *UsersResource) Destroy(c buffalo.Context) error
- func (ur *UsersResource) Edit(c buffalo.Context) error
- func (ur *UsersResource) List(c buffalo.Context) error
- func (ur *UsersResource) New(c buffalo.Context) error
- func (ur *UsersResource) Show(c buffalo.Context) error
- func (ur *UsersResource) Update(c buffalo.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ENV = defaults.String(os.Getenv("GO_ENV"), "development")
ENV is used to help switch settings based on where the application is being run. Default is "development".
Functions ¶
Types ¶
type UsersResource ¶
type UsersResource struct {
buffalo.BaseResource
}
UsersResource allows CRUD with HTTP against the User model
func (*UsersResource) Create ¶
func (ur *UsersResource) Create(c buffalo.Context) error
Create is a JSON API endpoint that adds a new user
func (*UsersResource) Destroy ¶
func (ur *UsersResource) Destroy(c buffalo.Context) error
Destroy is an API endpoint that deletes a user
func (*UsersResource) Edit ¶
func (ur *UsersResource) Edit(c buffalo.Context) error
Edit renders an html form for editing a user
func (*UsersResource) List ¶
func (ur *UsersResource) List(c buffalo.Context) error
List shows all users in an HTML page
func (*UsersResource) New ¶
func (ur *UsersResource) New(c buffalo.Context) error
New renders a form for adding a new user
Click to show internal directories.
Click to hide internal directories.