controller

package
v0.0.0-...-52b9301 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpdateFormTmplFile    = "update_form.gohtml"
	DefaultUpdateFormOpts = UpdateFormOpts{
		Genders:    []string{"Male", "Female"},
		Levels:     []string{"1. Freshman", "2. Sophomore", "4. Senior", "3. Junior"},
		States:     []string{"CA", "SD", "NC", "WI", "MD", "NE", "MA", "FL", "SC", "AK", "NY", "NH", "RI"},
		Majors:     []string{"English", "Math", "Art", "Physics"},
		Activities: []string{"Drama Club", "Lacrosse", "Basketball", "Baseball", "Debate", "Track & Field"},
	}
)

Functions

This section is empty.

Types

type UpdateCntrl

type UpdateCntrl interface {
	Form(ec echo.Context) error
	Submit(ec echo.Context) error
}

func NewUpdateCntrl

func NewUpdateCntrl(repo repo.StudentRepo, tmpl *template.Template) UpdateCntrl

type UpdateFormOpts

type UpdateFormOpts struct {
	Genders    []string
	Levels     []string
	States     []string
	Majors     []string
	Activities []string
}

type UpdateFormTmplData

type UpdateFormTmplData struct {
	Row     int
	Error   string
	Success string
	Student *repo.Student
	Opts    UpdateFormOpts
}

Jump to

Keyboard shortcuts

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