models

package
v0.0.0-...-b63fe73 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRecord = errors.New("models: no matching record found")

Functions

This section is empty.

Types

type Contact

type Contact struct {
	ID    int    `json:"id"`
	First string `json:"first"`
	Last  string `json:"last"`
	Phone string `json:"phone"`
	Email string `json:"email"`
}

Contact represents a contact persisted to storage.

type ContactForm

type ContactForm struct {
	ID                  int    `form:"-"`
	First               string `form:"first"`
	Last                string `form:"last"`
	Phone               string `form:"phone"`
	Email               string `form:"email"`
	validator.Validator `form:"-"`
}

ContactForm represents a form for creating or updating a contact.

type ContactsIndexVM

type ContactsIndexVM struct {
	Contacts []*Contact
	Query    string
}

ContactsIndexVM represents a view model containing multiple contacts.

type ContactsViewVM

type ContactsViewVM struct {
	Contact *Contact
}

ContactsViewVM represents a view model containing a single contact.

Jump to

Keyboard shortcuts

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