controllers

package
v0.0.0-...-c602698 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieSession = "session"
)

Variables

This section is empty.

Functions

func FAQ

func FAQ(tpl Template) http.HandlerFunc

func StaticHandler

func StaticHandler(tpl Template) http.HandlerFunc

Types

type Template

type Template interface {
	Execute(w http.ResponseWriter, r *http.Request, data interface{})
}

type Users

type Users struct {
	Templates struct {
		New    Template
		SignIn Template
	}
	UserService    *models.UserService
	SessionService *models.SessionService
}

func (Users) Create

func (u Users) Create(w http.ResponseWriter, r *http.Request)

func (Users) CurrentUser

func (u Users) CurrentUser(w http.ResponseWriter, r *http.Request)

func (Users) New

func (u Users) New(w http.ResponseWriter, r *http.Request)

func (Users) ProcessSignIn

func (u Users) ProcessSignIn(w http.ResponseWriter, r *http.Request)

func (Users) ProcessSignOut

func (u Users) ProcessSignOut(w http.ResponseWriter, r *http.Request)

func (Users) SignIn

func (u Users) SignIn(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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