actions

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 24 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".

View Source
var T *i18n.Translator

T provides i18n support for the application

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.

func AuthorizeOwnUser

func AuthorizeOwnUser(next buffalo.Handler) buffalo.Handler

AuthorizeOwnUser limits access to paths that contain the own userID.

func HomeHandler

func HomeHandler(c buffalo.Context) error

HomeHandler is a default handler to serve up a home page.

func SetCurrentApplication

func SetCurrentApplication(next buffalo.Handler) buffalo.Handler

SetCurrentApplication makes the current application_id available to the templates

func SetCurrentUser

func SetCurrentUser(next buffalo.Handler) buffalo.Handler

SetCurrentUser makes the userID accessible to the templates.

Types

type ApplicationsResource

type ApplicationsResource struct {
	buffalo.Resource
}

ApplicationsResource is the resource for the Application model

func (ApplicationsResource) Create

Create adds a Application to the DB. This function is mapped to the path POST /applications

func (ApplicationsResource) Destroy

Destroy deletes a Application from the DB. This function is mapped to the path DELETE /applications/{application_id}

func (ApplicationsResource) Edit

Edit renders a edit form for a Application. This function is mapped to the path GET /applications/{application_id}/edit

func (ApplicationsResource) List

List gets all Applications. This function is mapped to the path GET /applications

func (ApplicationsResource) New

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

func (ApplicationsResource) Show

Show gets the data for one Application. This function is mapped to the path GET /applications/{application_id}

func (ApplicationsResource) Update

Update changes a Application in the DB. This function is mapped to the path PUT /applications/{application_id}

type LicensesResource

type LicensesResource struct {
	buffalo.Resource
}

LicensesResource is the resource for the License model

func (LicensesResource) Create

func (v LicensesResource) Create(c buffalo.Context) error

Create adds a License to the DB. This function is mapped to the path POST /licenses

func (LicensesResource) Destroy

func (v LicensesResource) Destroy(c buffalo.Context) error

Destroy deletes a License from the DB. This function is mapped to the path DELETE /licenses/{license_id}

func (LicensesResource) Edit

Edit renders a edit form for a License. This function is mapped to the path GET /licenses/{license_id}/edit

func (LicensesResource) List

List gets all Licenses. This function is mapped to the path GET /licenses

func (LicensesResource) New

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

func (LicensesResource) Show

Show gets the data for one License. This function is mapped to the path GET /licenses/{license_id}

func (LicensesResource) Update

func (v LicensesResource) Update(c buffalo.Context) error

Update changes a License in the DB. This function is mapped to the path PUT /licenses/{license_id}

type MachinesResource added in v0.2.0

type MachinesResource struct {
	buffalo.Resource
}

MachinesResource is the resource for the Machine model

func (MachinesResource) Create added in v0.2.0

func (v MachinesResource) Create(c buffalo.Context) error

Create adds a Machine to the DB. This function is mapped to the path POST /machines

func (MachinesResource) Destroy added in v0.2.0

func (v MachinesResource) Destroy(c buffalo.Context) error

Destroy deletes a Machine from the DB. This function is mapped to the path DELETE /machines/{machine_id}

func (MachinesResource) Edit added in v0.2.0

Edit renders a edit form for a Machine. This function is mapped to the path GET /machines/{machine_id}/edit

func (MachinesResource) List added in v0.2.0

List gets all Machines. This function is mapped to the path GET /machines

func (MachinesResource) New added in v0.2.0

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

func (MachinesResource) Show added in v0.2.0

Show gets the data for one Machine. This function is mapped to the path GET /machines/{machine_id}

func (MachinesResource) Update added in v0.2.0

func (v MachinesResource) Update(c buffalo.Context) error

Update changes a Machine in the DB. This function is mapped to the path PUT /machines/{machine_id}

type UsersResource

type UsersResource struct {
	buffalo.Resource
}

UsersResource is the resource for the User model

func (UsersResource) Confirm

func (v UsersResource) Confirm(c buffalo.Context) error

Confirm marks the user as logged in. This function is mapped to the path /users/confirm?userID={userID}&token={token}

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 form 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) Logout

func (v UsersResource) Logout(c buffalo.Context) error

Logout removes the user session to log out the user.

func (UsersResource) New

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

func (UsersResource) Show

func (v UsersResource) Show(c buffalo.Context) error

Show gets the data for one User. This function is mapped to the path GET /users/{user_id}

func (UsersResource) Update

func (v UsersResource) Update(c buffalo.Context) error

Update changes a User in the DB. This function is mapped to the path PUT /users/{user_id}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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