contact

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxMessageLength = 800

Functions

This section is empty.

Types

type FormData

type FormData struct {
	ID           string
	At           time.Time
	EmailAddress string
	Message      string
}

func ParseAndValidateForm

func ParseAndValidateForm(r *http.Request, emailFieldName, messageFieldName string) (*FormData, error)

type Forms

type Forms interface {
	SaveNew(*FormData) error
}

type MockDB

type MockDB map[string]*FormData

func (MockDB) SaveNew

func (db MockDB) SaveNew(f *FormData) error

Jump to

Keyboard shortcuts

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