Documentation
¶
Index ¶
- type Contact
- type Store
- func (s *Store) Add(email, name string) error
- func (s *Store) Count() int
- func (s *Store) Get(email string) *Contact
- func (s *Store) List() []Contact
- func (s *Store) Remove(email string) error
- func (s *Store) Save() error
- func (s *Store) Search(query string) []Contact
- func (s *Store) Update(email, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct {
Email string `json:"email"`
Name string `json:"name,omitempty"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
Contact represents a single address book entry.
type Store ¶
type Store struct {
Contacts []Contact `json:"contacts"`
// contains filtered or unexported fields
}
Store manages the contacts address book.
Click to show internal directories.
Click to hide internal directories.