services

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: 10 Imported by: 0

Documentation

Index

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

func (*AuthService) Authorize

func (a *AuthService) Authorize(ctx context.Context, req *protos.AuthReq) (*protos.AuthRes, error)

Authorize authorizes user based on a session key

func (*AuthService) Logout

func (a *AuthService) Logout(ctx context.Context, req *protos.AuthReq) (*protos.AuthRes, error)

Logout removes the given session key

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

Jump to

Keyboard shortcuts

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