Documentation
¶
Index ¶
- Variables
- type Store
- func (s *Store) Add(app model.Application) (model.Application, error)
- func (s *Store) CountByStatus() map[string]int
- func (s *Store) Delete(id string) error
- func (s *Store) FilterByStatus(status string) []model.Application
- func (s *Store) GetByID(id string) (model.Application, error)
- func (s *Store) List() []model.Application
- func (s *Store) Search(query string) []model.Application
- func (s *Store) Total() int
- func (s *Store) Update(app model.Application) error
- func (s *Store) UpdateStatus(id string, status string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("application not found")
)
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages job applications in a JSON file
func (*Store) Add ¶
func (s *Store) Add(app model.Application) (model.Application, error)
Add creates a new application and returns it
func (*Store) CountByStatus ¶
CountByStatus returns a map of status to count
func (*Store) FilterByStatus ¶
func (s *Store) FilterByStatus(status string) []model.Application
FilterByStatus returns applications with the given status
func (*Store) GetByID ¶
func (s *Store) GetByID(id string) (model.Application, error)
GetByID returns a single application by ID
func (*Store) List ¶
func (s *Store) List() []model.Application
List returns all applications, sorted by date applied (newest first)
func (*Store) Search ¶
func (s *Store) Search(query string) []model.Application
Search returns applications matching the query in company or position
Click to show internal directories.
Click to hide internal directories.