user

package
v0.0.0-...-97fc41f Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSession

func DeleteSession(dbClient db.Database, id *protos.ObjectID) error

func DeleteSessionByKey

func DeleteSessionByKey(dbClient db.Database, key string) error

func DeleteUser

func DeleteUser(dbClient db.Database, id *protos.ObjectID) error

func FindLatestUserEpisode

func FindLatestUserEpisode(dbClient db.Database, userID *protos.ObjectID) (*protos.UserEpisode, error)

func FindOffset

func FindOffset(dbClient db.Database, userID, epiID *protos.ObjectID) int64

FindOffset takes database client and pointers to user and episode to lookup episode details and offset

func FindSession

func FindSession(dbClient db.Database, key string) (*protos.Session, error)

* Auth *

func FindSubscriptions

func FindSubscriptions(dbClient db.Database, userID *protos.ObjectID) ([]*protos.Subscription, error)

func FindUser

func FindUser(dbClient db.Database, username string) (*protos.User, error)

FindUser attempts to find user by username/email returns pointer to user or error if not found

func FindUserByID

func FindUserByID(dbClient db.Database, id *protos.ObjectID) (*protos.User, error)

func FindUserEpisode

func FindUserEpisode(dbClient db.Database, userID *protos.ObjectID, episodeID *protos.ObjectID) (*protos.UserEpisode, error)

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

func UpdateOffset(dbClient db.Database, uID, pID, eID *protos.ObjectID, offset int64) error

UpdateOffset takes userID epiID and offset and performs upsert to the UserEpisode collection

func UpdateUserEpiPlayed

func UpdateUserEpiPlayed(dbClient db.Database, uID, pID, eID *protos.ObjectID, played bool) error

func UpsertSession

func UpsertSession(dbClient db.Database, session *protos.Session) error

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.

Jump to

Keyboard shortcuts

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