Documentation ¶
Index ¶
- Constants
- func Connect() *mongo.Client
- func CreateCinema(client *mongo.Client, data models.Cinema) (bool, error)
- func CreateCinemaScreens(client *mongo.Client, screens []models.Screen) (success bool, err error)
- func CreateFestival(client *mongo.Client, data models.Fest) (bool, error)
- func CreateSchedule(client *mongo.Client, data models.Schedule) (bool, error)
- func CreateSlots(client *mongo.Client, slots []models.Slot) bool
- func DeleteCinema(client *mongo.Client, cinemaID string) (success bool, err error)
- func Disconnect(client *mongo.Client)
- func GetCinema(client *mongo.Client, cinemaID string) (data models.Cinema, err error)
- func GetCinemaScreens(client *mongo.Client, cinemaID string) (data []models.Screen, err error)
- func GetCinemasInBulk(client *mongo.Client, cinemaIDlist []string) (data []models.Screen, err error)
- func GetDefaultScheduleID(client *mongo.Client, festId string) (string, error)
- func GetDirector(movieID string) (data []string, err error)
- func GetFestival(client *mongo.Client, fid string) (data models.Fest, err error)
- func GetMovie(movieID string) (data models.TMDBmovie, err error)
- func GetSchedule(client *mongo.Client, festId string, scheduleId string) (data models.Schedule, err error)
- func GetScheduleSlots(client *mongo.Client, scheduleID string, optionals ...int64) (records []models.Slot, err error)
- func GetScheduleSlotsByTime(client *mongo.Client, scheduleID string, from int, to int) (records []models.Slot, err error)
- func GetScreen(client *mongo.Client, screenID string) (data models.Screen, err error)
- func GetScreensInBulk(client *mongo.Client, screenIDlist []string) (data []models.Screen, err error)
- func GetSlotScreensOfSchedule(client *mongo.Client, scheduleID string) (data []string, err error)
- func IsUniqueScheduleID(client *mongo.Client, id string) bool
- func Migrate() bool
- func ReplaceCinema(client *mongo.Client, cinemaID string, replacement models.Cinema) (success bool, err error)
- func ReplaceScreen(client *mongo.Client, screenID string, replacement models.Screen) (success bool, err error)
Constants ¶
const BASE_URL = "https://api.themoviedb.org/3"
Variables ¶
This section is empty.
Functions ¶
func CreateCinema ¶
Creates new cinema record.
func CreateCinemaScreens ¶
Creates multiple new screen records.
func CreateFestival ¶
Creates new festival record & returns inserted ID.
func CreateSchedule ¶
Creates new schedule.
func CreateSlots ¶
Creates new slot records & returns success.
func DeleteCinema ¶
Deletes the cinema record by id.
func Disconnect ¶
func GetCinemaScreens ¶
Fetches screens for a cinema by cinema id.
func GetCinemasInBulk ¶
func GetCinemasInBulk(client *mongo.Client, cinemaIDlist []string) (data []models.Screen, err error)
Fetches multiple cinema records.
func GetDefaultScheduleID ¶
Fetches the default schedule of a festival
func GetDirector ¶
Get director details of a movie id from TMDB API.
func GetFestival ¶
Fetches one festival record by fest id.
func GetSchedule ¶
func GetSchedule(client *mongo.Client, festId string, scheduleId string) (data models.Schedule, err error)
Fetches the schedule record by fest id & schedule id.
func GetScheduleSlots ¶
func GetScheduleSlots(client *mongo.Client, scheduleID string, optionals ...int64) (records []models.Slot, err error)
Fetches all slots for a given schedule id.
func GetScheduleSlotsByTime ¶
func GetScheduleSlotsByTime(client *mongo.Client, scheduleID string, from int, to int) (records []models.Slot, err error)
Fetches all slots between given from and to time.
func GetScreensInBulk ¶
func GetScreensInBulk(client *mongo.Client, screenIDlist []string) (data []models.Screen, err error)
Fetches multiple screen records.
func GetSlotScreensOfSchedule ¶
Fetches screen ID list of slots for a given schedule id.
func IsUniqueScheduleID ¶
Checks if id already exists in db.
Types ¶
This section is empty.