controllers

package
v0.0.0-...-900bee6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouteRecipeEdit = "routeRecipeEdit"
	RouteRecipeShow = "routeRecipeShow"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RecipeCreateForm

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

type RecipeUpdateForm

type RecipeUpdateForm struct {
	Title        string `schema:"title"`
	Description  string `schema:"description"`
	Ingredients  string `schema:"ingredients"`
	Instructions string `schema:"instructions"`
}

type Recipes

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

func NewRecipes

func NewRecipes(rs models.RecipeService, is models.ImageService, router *mux.Router) *Recipes

func (*Recipes) Create

func (rc *Recipes) Create(rw http.ResponseWriter, r *http.Request)

func (*Recipes) Edit

func (rc *Recipes) Edit(rw http.ResponseWriter, r *http.Request)

func (*Recipes) ImageDelete

func (rc *Recipes) ImageDelete(rw http.ResponseWriter, r *http.Request)

func (*Recipes) ImageUpload

func (rc *Recipes) ImageUpload(rw http.ResponseWriter, r *http.Request)

func (*Recipes) Index

func (rc *Recipes) Index(rw http.ResponseWriter, r *http.Request)

func (*Recipes) Show

func (rc *Recipes) Show(rw http.ResponseWriter, r *http.Request)

func (*Recipes) Update

func (rc *Recipes) Update(rw http.ResponseWriter, r *http.Request)

type SignInForm

type SignInForm struct {
	Email    string
	Password string
}

type SignUpForm

type SignUpForm struct {
	Name     string
	Email    string
	Password string
}

type Static

type Static struct {
	Home *views.View
}

func NewStatic

func NewStatic() *Static

type Users

type Users struct {
	SignUpView *views.View
	SignInView *views.View
	// contains filtered or unexported fields
}

func NewUsers

func NewUsers(us models.UserService) *Users

func (*Users) SignIn

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

func (*Users) SignUp

func (u *Users) SignUp(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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