Documentation ¶
Index ¶
- func DeleteSession(dbClient db.Database, id *protos.ObjectID) error
- func DeleteSessionByKey(dbClient db.Database, key string) error
- func DeleteUser(dbClient db.Database, id *protos.ObjectID) error
- func FindLatestUserEpisode(dbClient db.Database, userID *protos.ObjectID) (*protos.UserEpisode, error)
- func FindOffset(dbClient db.Database, userID, epiID *protos.ObjectID) int64
- func FindSession(dbClient db.Database, key string) (*protos.Session, error)
- func FindSubscriptions(dbClient db.Database, userID *protos.ObjectID) ([]*protos.Subscription, error)
- func FindUser(dbClient db.Database, username string) (*protos.User, error)
- func FindUserByID(dbClient db.Database, id *protos.ObjectID) (*protos.User, error)
- func FindUserEpisode(dbClient db.Database, userID *protos.ObjectID, episodeID *protos.ObjectID) (*protos.UserEpisode, error)
- func FindUserLastPlayed(dbClient db.Database, userID *protos.ObjectID) (*protos.Podcast, *protos.Episode, *protos.UserEpisode, error)
- func UpdateOffset(dbClient db.Database, uID, pID, eID *protos.ObjectID, offset int64) error
- func UpdateUserEpiPlayed(dbClient db.Database, uID, pID, eID *protos.ObjectID, played bool) error
- func UpsertSession(dbClient db.Database, session *protos.Session) error
- func UpsertSubscription(dbClient db.Database, subscription *protos.Subscription) error
- func UpsertUserEpisode(dbClient db.Database, userEpisode *protos.UserEpisode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindLatestUserEpisode ¶
func FindOffset ¶
FindOffset takes database client and pointers to user and episode to lookup episode details and offset
func FindSession ¶
* Auth *
func FindSubscriptions ¶
func FindUser ¶
FindUser attempts to find user by username/email returns pointer to user or error if not found
func FindUserByID ¶
func FindUserEpisode ¶
func FindUserLastPlayed ¶
func FindUserLastPlayed(dbClient db.Database, userID *protos.ObjectID) (*protos.Podcast, *protos.Episode, *protos.UserEpisode, error)
FindUserLastPlayed takes dbClient, userID, returns the latest played episode and offset
func UpdateOffset ¶
UpdateOffset takes userID epiID and offset and performs upsert to the UserEpisode collection
func UpdateUserEpiPlayed ¶
func UpsertSubscription ¶
func UpsertSubscription(dbClient db.Database, subscription *protos.Subscription) error
func UpsertUserEpisode ¶
func UpsertUserEpisode(dbClient db.Database, userEpisode *protos.UserEpisode) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.