Versions in this module Expand all Collapse all v1 v1.0.0 May 1, 2022 Changes in this version + func BaseAddress(r *http.Request) string + func BasePath(path string) string + func ErrFieldExists(field string) error + func ErrFieldRequired(field string) error + func FlashFormWithErrors(sess *sessions.Session, f Form, errs ValidationErrors) + func FormFields(sess *sessions.Session) map[string]string + func HTML(w http.ResponseWriter, content string, status int) + func JSON(w http.ResponseWriter, data interface{}, status int) + func Text(w http.ResponseWriter, content string, status int) + func UnmarshalForm(f Form, r *http.Request) error + func UnmarshalFormWithFile(f Form, file *File, r *http.Request) error + func Validate(v Validator) error + type File struct + Field string + Header *multipart.FileHeader + Type string + func (f *File) Remove() error + func (f *File) UnmarshalRequest(r *http.Request) error + type FileValidator struct + Mimes []string + MimesAllowed bool + Size int64 + func (v *FileValidator) HasFile() bool + func (v *FileValidator) Validate(errs ValidationErrors) + type Form interface + Fields func() map[string]string + type FormUnmarshaler struct + Decoder *schema.Decoder + Form Form + func (f FormUnmarshaler) UnmarshalRequest(r *http.Request) error + type UnmarshalError struct + Err error + Field string + func (e UnmarshalError) Error() string + type ValidationErrors map[string][]string + func FormErrors(sess *sessions.Session) ValidationErrors + func NewValidationErrors() ValidationErrors + func (e ValidationErrors) Add(key string, err error) + func (e ValidationErrors) Error() string + func (e ValidationErrors) First(key string) string + func (e ValidationErrors) Merge(verrs ValidationErrors) + type Validator interface + Validate func(errs ValidationErrors) Other modules containing this package github.com/andrewpillar/webutil/v2