Documentation ¶
Index ¶
- type Bookmark
- type Repository
- func (r *Repository) BookmarkJob(userID string, jobID int, setApplied bool) error
- func (r *Repository) GetBookmarksByJobId(userID string) (map[int]*Bookmark, error)
- func (r *Repository) GetBookmarksForUser(userID string) ([]*Bookmark, error)
- func (r *Repository) RemoveBookmark(userID string, jobID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bookmark ¶
type Bookmark struct { UserID string JobPostID int CreatedAt time.Time AppliedAt pq.NullTime JobSlug string JobTitle string CompanyName string JobExternalID string CompanyURLEnc string JobLocation string JobSalaryRange string JobSalaryPeriod string JobCreatedAt time.Time JobTimeAgo string HasApplyRecord bool }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB) *Repository
func (*Repository) BookmarkJob ¶
func (r *Repository) BookmarkJob(userID string, jobID int, setApplied bool) error
func (*Repository) GetBookmarksByJobId ¶
func (r *Repository) GetBookmarksByJobId(userID string) (map[int]*Bookmark, error)
GetBookmarksByJobId can be used to quickly & efficiently check whether a job has previously been bookmarked by a user
func (*Repository) GetBookmarksForUser ¶
func (r *Repository) GetBookmarksForUser(userID string) ([]*Bookmark, error)
func (*Repository) RemoveBookmark ¶
func (r *Repository) RemoveBookmark(userID string, jobID int) error
Click to show internal directories.
Click to hide internal directories.