Documentation ¶
Index ¶
- type FileService
- type JobService
- type PlaylistService
- func (s *PlaylistService) FindPlaylistByID(ctx context.Context, id int) (*peapod.Playlist, error)
- func (s *PlaylistService) FindPlaylistByToken(ctx context.Context, token string) (*peapod.Playlist, error)
- func (s *PlaylistService) FindPlaylistsByUserID(ctx context.Context, id int) ([]*peapod.Playlist, error)
- type SMSService
- type TrackService
- type URLTrackGenerator
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileService ¶
type FileService struct { GenerateNameFn func(ext string) string FindFileByNameFn func(ctx context.Context, name string) (*peapod.File, io.ReadCloser, error) CreateFileFn func(ctx context.Context, f *peapod.File, r io.Reader) error }
func (*FileService) CreateFile ¶
func (*FileService) FindFileByName ¶
func (s *FileService) FindFileByName(ctx context.Context, name string) (*peapod.File, io.ReadCloser, error)
func (*FileService) GenerateName ¶
func (s *FileService) GenerateName(ext string) string
type JobService ¶
type JobService struct { CFn func() <-chan struct{} CreateJobFn func(ctx context.Context, job *peapod.Job) error NextJobFn func(ctx context.Context) (*peapod.Job, error) CompleteJobFn func(ctx context.Context, id int, err error) error }
JobService manages jobs in a job queue.
func (*JobService) C ¶
func (s *JobService) C() <-chan struct{}
func (*JobService) CompleteJob ¶
type PlaylistService ¶
type PlaylistService struct { FindPlaylistByIDFn func(ctx context.Context, id int) (*peapod.Playlist, error) FindPlaylistByTokenFn func(ctx context.Context, token string) (*peapod.Playlist, error) FindPlaylistsByUserIDFn func(ctx context.Context, id int) ([]*peapod.Playlist, error) }
func (*PlaylistService) FindPlaylistByID ¶
func (*PlaylistService) FindPlaylistByToken ¶
func (*PlaylistService) FindPlaylistsByUserID ¶
type SMSService ¶
type TrackService ¶
type TrackService struct { FindTrackByIDFn func(ctx context.Context, id int) (*peapod.Track, error) CreateTrackFn func(ctx context.Context, track *peapod.Track) error }
func (*TrackService) CreateTrack ¶
func (*TrackService) FindTrackByID ¶
type URLTrackGenerator ¶
type URLTrackGenerator struct {
GenerateTrackFromURLFn func(ctx context.Context, url url.URL) (*peapod.Track, io.ReadCloser, error)
}
func (*URLTrackGenerator) GenerateTrackFromURL ¶
func (g *URLTrackGenerator) GenerateTrackFromURL(ctx context.Context, url url.URL) (*peapod.Track, io.ReadCloser, error)
type UserService ¶
type UserService struct { FindUserByIDFn func(ctx context.Context, id int) (*peapod.User, error) FindUserByMobileNumberFn func(ctx context.Context, mobileNumber string) (*peapod.User, error) CreateUserFn func(ctx context.Context, user *peapod.User) error }
func (*UserService) CreateUser ¶
func (*UserService) FindUserByID ¶
func (*UserService) FindUserByMobileNumber ¶
Click to show internal directories.
Click to hide internal directories.