Documentation ¶
Index ¶
- type AdminService
- type AuthService
- type PodcastService
- func (p *PodcastService) GetEpisodes(ctx context.Context, req *protos.GetEpiReq) (*protos.Episodes, error)
- func (p *PodcastService) GetPodcast(ctx context.Context, req *protos.GetPodReq) (*protos.Podcast, error)
- func (p *PodcastService) GetSubscriptions(ctx context.Context, req *protos.GetSubReq) (*protos.Subscriptions, error)
- func (p *PodcastService) GetUserEpisode(ctx context.Context, req *protos.GetUserEpiReq) (*protos.UserEpisode, error)
- func (p *PodcastService) GetUserLastPlayed(ctx context.Context, req *protos.GetUserLastPlayedReq) (*protos.LastPlayedRes, error)
- func (p *PodcastService) UpsertUserEpisode(ctx context.Context, userEpiReq *protos.UserEpisode) (*protos.Response, error)
- type Server
- type TwirpService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService struct {
// contains filtered or unexported fields
}
func NewAdminService ¶
func NewAdminService(podCon *podcast.PodController, rssCon *podcast.RSSController) *AdminService
func (*AdminService) AddPodcast ¶
func (a *AdminService) AddPodcast(ctx context.Context, req *protos.AddPodReq) (*protos.AddPodRes, error)
Podcasts
func (*AdminService) RefreshPodcast ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService is the twirp service for authentication and authorization
func NewAuthService ¶
func NewAuthService(a *auth.AuthController) *AuthService
NewAuthService creates a new *AuthService
func (*AuthService) Authenticate ¶
func (a *AuthService) Authenticate(ctx context.Context, req *protos.AuthenticateReq) (*protos.AuthenticateRes, error)
Authenticate handles the authentication to syncapod and returns response
type PodcastService ¶
type PodcastService struct {
// contains filtered or unexported fields
}
PodcastService is the gRPC service for podcast
func NewPodcastService ¶
func NewPodcastService(podCon *podcast.PodController) *PodcastService
NewPodcastService creates a new *PodcastService
func (*PodcastService) GetEpisodes ¶
func (p *PodcastService) GetEpisodes(ctx context.Context, req *protos.GetEpiReq) (*protos.Episodes, error)
GetEpisodes returns a list of episodes via podcast id
func (*PodcastService) GetPodcast ¶
func (p *PodcastService) GetPodcast(ctx context.Context, req *protos.GetPodReq) (*protos.Podcast, error)
GetPodcast returns a podcast via id
func (*PodcastService) GetSubscriptions ¶
func (p *PodcastService) GetSubscriptions(ctx context.Context, req *protos.GetSubReq) (*protos.Subscriptions, error)
GetSubscriptions returns a list of podcasts via user id
func (*PodcastService) GetUserEpisode ¶
func (p *PodcastService) GetUserEpisode(ctx context.Context, req *protos.GetUserEpiReq) (*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.GetUserLastPlayedReq) (*protos.LastPlayedRes, error)
GetUserLastPlayed returns the last episode the user was playing & metadata
func (*PodcastService) UpsertUserEpisode ¶
func (p *PodcastService) UpsertUserEpisode(ctx context.Context, userEpiReq *protos.UserEpisode) (*protos.Response, error)
UpsertUserEpisode updates the user playback metadata via episode id & user id
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is truly needed for its Intercept method which authenticates users before accessing services, but also useful to have all the grpc server boilerplate contained within NewServer function
type TwirpService ¶
type TwirpService struct {
// contains filtered or unexported fields
}