handlers

package
v0.0.0-...-b1f2603 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const RemindersTmpl = `` /* 859-byte string literal not displayed */
View Source
const Week = time.Duration(time.Hour * 24 * 7)

Variables

This section is empty.

Functions

func CreateReminder

func CreateReminder(ctx echo.Context) error

func Error

func Error(c echo.Context) error

Error - Example Error Handler

func GetReminder

func GetReminder(ctx echo.Context) error

func HealthCheck

func HealthCheck(c echo.Context) error

HealthCheck - Health Check Handler

func Login

func Login(c echo.Context) error

Login - Login Handler will take a username and password from the request hash the password, verify it matches in the database and respond with a token

func Logout

func Logout(c echo.Context) error

func RenderMoreReminders

func RenderMoreReminders(c echo.Context) error

func RenderReminders

func RenderReminders(c echo.Context) error

Types

type CustomTemplate

type CustomTemplate struct {
	*template.Template
}

func (*CustomTemplate) Render

func (ct *CustomTemplate) Render(w io.Writer, name string, data interface{},
	ctx echo.Context) error

type Reminder

type Reminder struct {
	ID   uuid.UUID
	Name string
	Due  time.Time
}

type TmplData

type TmplData struct {
	Reminders []Reminder
	Title     string
	// contains filtered or unexported fields
}

func (TmplData) Reverse

func (td TmplData) Reverse(name string, params ...interface{}) string

Jump to

Keyboard shortcuts

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