bookmark

package
v0.0.0-...-80e8cda Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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