actions

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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".

Functions

func App

func App() *buffalo.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 AuthCallback(c buffalo.Context) error

func AuthDestroy

func AuthDestroy(c buffalo.Context) error

func Authorize

func Authorize(next buffalo.Handler) buffalo.Handler

func HomeHandler

func HomeHandler(c buffalo.Context) error

func RedirectHandler

func RedirectHandler(c buffalo.Context) error

func SetCurrentUser

func SetCurrentUser(next buffalo.Handler) buffalo.Handler

Types

type ShortenedLinksResource

type ShortenedLinksResource struct {
	buffalo.Resource
}

ShortenedLinksResource is the resource for the ShortenedLink model

func (ShortenedLinksResource) Create

Create adds a ShortenedLink to the DB. This function is mapped to the path POST /shortened_links

func (ShortenedLinksResource) Destroy

Destroy deletes a ShortenedLink from the DB. This function is mapped to the path DELETE /shortened_links/{shortened_link_id}

func (ShortenedLinksResource) Edit

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

List gets all ShortenedLinks. This function is mapped to the path GET /shortened_links

func (ShortenedLinksResource) New

New renders the form for creating a new ShortenedLink. This function is mapped to the path GET /shortened_links/new

func (ShortenedLinksResource) Show

Show gets the data for one ShortenedLink. This function is mapped to the path GET /shortened_links/{shortened_link_id}

func (ShortenedLinksResource) Update

Update changes a ShortenedLink in the DB. This function is mapped to the path PUT /shortened_links/{shortened_link_id}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL