controllers

package
v0.0.0-...-9edd450 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CookieSession = "session"

Variables

This section is empty.

Functions

func DeleteCookie

func DeleteCookie(w http.ResponseWriter, name string)

func FAQ

func ReadCookie

func ReadCookie(r *http.Request, name string) (string, error)

func StaticHandler

func StaticHandler(t views.Template) http.HandlerFunc

Types

type GalleryController

type GalleryController struct {
	Template struct {
		New   Template
		Edit  Template
		Index Template
		Show  Template
	}
	GalleryService *models.GalleryService
}

func (GalleryController) Create

func (GalleryController) Delete

func (GalleryController) DeleteImage

func (g GalleryController) DeleteImage(w http.ResponseWriter, r *http.Request)

func (GalleryController) Edit

func (GalleryController) Image

func (GalleryController) Index

func (GalleryController) New

func (GalleryController) Show

func (GalleryController) Update

func (GalleryController) UploadImage

func (g GalleryController) UploadImage(w http.ResponseWriter, r *http.Request)

type Template

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

type Users

type Users struct {
	Template struct {
		New            Template
		SignIn         Template
		ForgotPassword Template
		CheckYourEmail Template
		ResetPassword  Template
	}
	UserService          *models.UserService
	SessionService       *models.SessionService
	PasswordResetService *models.PasswordResetService
	EmailService         *models.EmailService
}

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) ForgotPassword

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

func (Users) New

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

func (Users) ProcessForgotPassword

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

func (Users) ProcessResetPassword

func (u Users) ProcessResetPassword(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) ResetPassword

func (u Users) ResetPassword(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