web

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundTmpl = template.Must(template.New("").Parse(`Not Found`))
)
View Source
var RegisterTmpl = template.Must(
	template.New("").Parse(`form{{ if .Validation }}invalid{{end}}`))

Functions

func New

func New() http.Handler

Types

type NotFoundOutput

type NotFoundOutput struct{}

func (NotFoundOutput) Status

func (_ NotFoundOutput) Status() int

func (NotFoundOutput) Template

func (_ NotFoundOutput) Template() *template.Template

type RegisterInput

type RegisterInput struct{ *Registration }

func (*RegisterInput) Read

func (in *RegisterInput) Read(r *http.Request)

func (RegisterInput) SkipDecode

func (_ RegisterInput) SkipDecode() bool

func (RegisterInput) Validate

func (in RegisterInput) Validate() (v url.Values)

type RegisterOutput

type RegisterOutput struct {
	RedirectTo string
	Validation url.Values
}

func (RegisterOutput) Empty

func (out RegisterOutput) Empty() bool

func (RegisterOutput) Redirect

func (out RegisterOutput) Redirect() string

func (RegisterOutput) Status

func (out RegisterOutput) Status() int

func (RegisterOutput) Template

func (_ RegisterOutput) Template() *template.Template

type Registration

type Registration struct {
	Email    string
	Password string
}

Jump to

Keyboard shortcuts

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