Documentation
¶
Index ¶
- func Populate(mg *Manager) error
- type Manager
- func (mg *Manager) AddMovie(m *movie.Movie)
- func (mg *Manager) AddRating(r *rating.Rating) error
- func (mg *Manager) AddUser(u *user.User)
- func (mg *Manager) FetchAllUsers() []*user.User
- func (mg *Manager) FetchMovie(id int) (*movie.Movie, error)
- func (mg *Manager) FetchUnseenMoviesRatings(movieIDs, userIDs []int) []*rating.Rating
- func (mg *Manager) FetchUser(id int) (*user.User, error)
- func (mg *Manager) FetchUserRating(userID, movieID int) (*rating.Rating, error)
- func (mg *Manager) GetMovieCount() int
- func (mg *Manager) UpdateSchemas()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager that controls database access.
func (*Manager) AddRating ¶
AddRating to database. Returns an error if either the movie or the user don't exist.
func (*Manager) FetchAllUsers ¶
FetchAllUsers present in the database.
func (*Manager) FetchMovie ¶
FetchMovie with the given ID.
func (*Manager) FetchUnseenMoviesRatings ¶
FetchUnseenMoviesRatings by users in a given group.
func (*Manager) FetchUserRating ¶
FetchUserRating for a given movie, if it exists.
func (*Manager) GetMovieCount ¶
GetMovieCount of the database.
Click to show internal directories.
Click to hide internal directories.