controllers

package
v0.0.0-...-a8002e0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexGalleries = "index_galleries"
	ShowGallery    = "show_gallery"
	EditGallery    = "edit_gallery"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Galleries

type Galleries struct {
	New       *views.View
	ShowView  *views.View
	EditView  *views.View
	IndexView *views.View
	// contains filtered or unexported fields
}

func (*Galleries) Create

func (g *Galleries) Create(w http.ResponseWriter, r *http.Request)

POST /galleries

func (*Galleries) Delete

func (g *Galleries) Delete(w http.ResponseWriter, r *http.Request)

POST /galleries/:id/delete

func (*Galleries) Edit

func (g *Galleries) Edit(w http.ResponseWriter, r *http.Request)

GET /galleries/:id/edit

func (*Galleries) ImageDelete

func (g *Galleries) ImageDelete(w http.ResponseWriter, r *http.Request)

POST /galleries/:id/images/:filename/delete

func (*Galleries) ImageUpload

func (g *Galleries) ImageUpload(w http.ResponseWriter, r *http.Request)

POST /galleries/:id/images

func (*Galleries) Index

func (g *Galleries) Index(w http.ResponseWriter, r *http.Request)

GET /galleries

func (*Galleries) Show

func (g *Galleries) Show(w http.ResponseWriter, r *http.Request)

GET /galleries/:id

func (*Galleries) Update

func (g *Galleries) Update(w http.ResponseWriter, r *http.Request)

type GalleryForm

type GalleryForm struct {
	Title string `schema:"title"`
}

type LoginForm

type LoginForm struct {
	Email    string `schema:"email"`
	Password string `schema:"password"`
}

type SignupForm

type SignupForm struct {
	Name     string `schema:"name"`
	Email    string `schema:"email"`
	Password string `schema:"password"`
}

type Static

type Static struct {
	Home    *views.View
	Contact *views.View
	FAQ     *views.View
}

func NewStatic

func NewStatic() *Static

type Users

type Users struct {
	NewView   *views.View
	LoginView *views.View
	// contains filtered or unexported fields
}

func NewUsers

func NewUsers(us models.UserService) *Users

func (*Users) CookieTest

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

func (*Users) Create

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

tries to create a new user account.

POST /signup

func (*Users) Login

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

Login is used to process the login form when a user tries to log in as an existing user (via email & pw).

POST /login

func (*Users) New

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

New is used to render the form where a user can create a new user account.

GET /signup

Jump to

Keyboard shortcuts

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