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 RedirectHandler(c buffalo.Context) error
- func SetCurrentUser(next buffalo.Handler) buffalo.Handler
- type ShortenedLinksResource
- func (v ShortenedLinksResource) Create(c buffalo.Context) error
- func (v ShortenedLinksResource) Destroy(c buffalo.Context) error
- func (v ShortenedLinksResource) Edit(c buffalo.Context) error
- func (v ShortenedLinksResource) List(c buffalo.Context) error
- func (v ShortenedLinksResource) New(c buffalo.Context) error
- func (v ShortenedLinksResource) Show(c buffalo.Context) error
- func (v ShortenedLinksResource) 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
)
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 AuthCallback ¶
func AuthDestroy ¶
func HomeHandler ¶
func RedirectHandler ¶
Types ¶
type ShortenedLinksResource ¶
ShortenedLinksResource is the resource for the ShortenedLink model
func (ShortenedLinksResource) Create ¶
func (v ShortenedLinksResource) Create(c buffalo.Context) error
Create adds a ShortenedLink to the DB. This function is mapped to the path POST /shortened_links
func (ShortenedLinksResource) Destroy ¶
func (v ShortenedLinksResource) Destroy(c buffalo.Context) error
Destroy deletes a ShortenedLink from the DB. This function is mapped to the path DELETE /shortened_links/{shortened_link_id}
func (ShortenedLinksResource) Edit ¶
func (v ShortenedLinksResource) Edit(c buffalo.Context) error
Edit renders a edit form for a ShortenedLink. This function is mapped to the path GET /shortened_links/{shortened_link_id}/edit
func (ShortenedLinksResource) List ¶
func (v ShortenedLinksResource) List(c buffalo.Context) error
List gets all ShortenedLinks. This function is mapped to the path GET /shortened_links
func (ShortenedLinksResource) New ¶
func (v ShortenedLinksResource) New(c buffalo.Context) error
New renders the form for creating a new ShortenedLink. This function is mapped to the path GET /shortened_links/new