Documentation ¶
Index ¶
- type AuthService
- type PodcastService
- func (p *PodcastService) GetEpisodes(ctx context.Context, req *protos.Request) (*protos.Episodes, error)
- func (p *PodcastService) GetPodcast(ctx context.Context, req *protos.Request) (*protos.Podcast, error)
- func (p *PodcastService) GetSubscriptions(ctx context.Context, req *protos.Request) (*protos.Subscriptions, error)
- func (p *PodcastService) GetUserEpisode(ctx context.Context, req *protos.Request) (*protos.UserEpisode, error)
- func (p *PodcastService) GetUserLastPlayed(ctx context.Context, req *protos.Request) (*protos.LastPlayedRes, error)
- func (p *PodcastService) UpdateUserEpisode(ctx context.Context, req *protos.UserEpisodeReq) (*protos.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { *protos.UnimplementedAuthServer // contains filtered or unexported fields }
AuthService is the gRPC service for authentication and authorization
func NewAuthService ¶
func NewAuthService(dbClient db.Database) *AuthService
NewAuthService creates a new *AuthService
func (*AuthService) Authenticate ¶
func (a *AuthService) Authenticate(ctx context.Context, req *protos.AuthReq) (*protos.AuthRes, error)
Authenticate handles the authentication to syncapod and returns response
type PodcastService ¶
type PodcastService struct { *protos.UnimplementedPodServer // contains filtered or unexported fields }
PodcastService is the gRPC service for podcast
func NewPodcastService ¶
func NewPodcastService(dbClient db.Database) *PodcastService
NewPodcastService creates a new *PodcastService
func (*PodcastService) GetEpisodes ¶
func (p *PodcastService) GetEpisodes(ctx context.Context, req *protos.Request) (*protos.Episodes, error)
GetEpisodes returns a list of episodes via podcast id
func (*PodcastService) GetPodcast ¶
func (p *PodcastService) GetPodcast(ctx context.Context, req *protos.Request) (*protos.Podcast, error)
GetPodcast returns a podcast via id
func (*PodcastService) GetSubscriptions ¶
func (p *PodcastService) GetSubscriptions(ctx context.Context, req *protos.Request) (*protos.Subscriptions, error)
GetSubscriptions returns a list of podcasts via user id
func (*PodcastService) GetUserEpisode ¶
func (p *PodcastService) GetUserEpisode(ctx context.Context, req *protos.Request) (*protos.UserEpisode, error)
GetUserEpisode returns the user playback metadata via episode id & user id
func (*PodcastService) GetUserLastPlayed ¶
func (p *PodcastService) GetUserLastPlayed(ctx context.Context, req *protos.Request) (*protos.LastPlayedRes, error)
GetUserLastPlayed returns the last episode the user was playing & metadata
func (*PodcastService) UpdateUserEpisode ¶
func (p *PodcastService) UpdateUserEpisode(ctx context.Context, req *protos.UserEpisodeReq) (*protos.Response, error)
UpdateUserEpisode updates the user playback metadata via episode id & user id