resources

package
v0.0.0-...-7289f46 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const RedirKey = "redir"

RedirKey is the key used in query strings to indicate where to redirect

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

Base is the base of all resources. Compose it into your structs

func NewBase

func NewBase(basePath string) Base

NewBase creates a new base with the given base path

func (Base) BasePath

func (b Base) BasePath() string

func (Base) Redirect

func (b Base) Redirect(c buffalo.Context) error

Redirect uses c to send a 302 Temporary Redirect back to the client.

It uses RedirKey to figure out where to redirect. If there is no RedirKey present, it instead uses the base path it's configured with

func (Base) StringParam

func (b Base) StringParam(c buffalo.Context, name, defalt string) string

StringParam returns the value of the parameter "name" from c, or defalt if it doesn't exist

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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