Documentation
¶
Overview ¶
Package service is the business logic connects the api with the internal mechanisms
Index ¶
- type Directory
- type Generator
- func (g *Generator) Create(ctx context.Context, userID int, genSave dto.GeneratorSave) (dto.Generator, error)
- func (g *Generator) Delete(ctx context.Context, userID, genID int, deletePlaylist bool) error
- func (g *Generator) GetByUser(ctx context.Context, userID int) ([]dto.Generator, error)
- func (g *Generator) Preview(ctx context.Context, userID int, params dto.GeneratorParams) ([]dto.Track, error)
- func (g *Generator) Refresh(ctx context.Context, userID, genID int) error
- func (g *Generator) Update(ctx context.Context, userID int, genSave dto.GeneratorSave) (dto.Generator, error)
- type Link
- type Playlist
- func (p *Playlist) GetByUser(ctx context.Context, userID int) ([]dto.Playlist, error)
- func (p *Playlist) GetCover(ctx context.Context, playlistID int) ([]byte, error)
- func (p *Playlist) GetDuplicates(ctx context.Context, userID int) ([]dto.PlaylistDuplicate, error)
- func (p *Playlist) GetUnplayables(ctx context.Context, userID int) ([]dto.PlaylistUnplayable, error)
- func (p *Playlist) RemoveDuplicates(ctx context.Context, userID int) error
- type Service
- func (s *Service) NewDirectory() *Directory
- func (s *Service) NewGenerator() *Generator
- func (s *Service) NewLink() *Link
- func (s *Service) NewPlaylist() *Playlist
- func (s *Service) NewSetting() *Setting
- func (s *Service) NewTask() *Task
- func (s *Service) NewTrack() *Track
- func (s *Service) NewUser() *User
- type Setting
- type Task
- type Track
- func (t *Track) GetAdded(ctx context.Context, filter dto.TrackFilter) ([]dto.TrackAdded, error)
- func (t *Track) GetByIDs(ctx context.Context, trackIDs []int) ([]dto.Track, error)
- func (t *Track) GetDeleted(ctx context.Context, filter dto.TrackFilter) ([]dto.TrackDeleted, error)
- func (t *Track) GetHistory(ctx context.Context, filter dto.HistoryFilter) ([]dto.History, error)
- type User
- func (u *User) Create(ctx context.Context, userSave dto.User) (dto.User, error)
- func (u *User) GetByID(ctx context.Context, id int) (dto.User, error)
- func (u *User) GetByUID(ctx context.Context, uid string) (dto.User, error)
- func (u *User) Update(ctx context.Context, userSave dto.User) (dto.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
type Generator ¶ added in v0.2.0
type Generator struct {
// contains filtered or unexported fields
}
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (*Link) GetAllByUser ¶
type Playlist ¶
type Playlist struct {
// contains filtered or unexported fields
}
func (*Playlist) GetDuplicates ¶
func (*Playlist) GetUnplayables ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(repo repository.Repository) *Service
func (*Service) NewDirectory ¶
func (*Service) NewGenerator ¶ added in v0.2.0
func (*Service) NewPlaylist ¶
func (*Service) NewSetting ¶ added in v0.2.0
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) GetHistory ¶
func (t *Task) GetHistory(ctx context.Context, filter dto.TaskFilter) ([]dto.TaskHistory, error)
type Track ¶
type Track struct {
// contains filtered or unexported fields
}
func (*Track) GetAdded ¶
func (t *Track) GetAdded(ctx context.Context, filter dto.TrackFilter) ([]dto.TrackAdded, error)
func (*Track) GetDeleted ¶
func (t *Track) GetDeleted(ctx context.Context, filter dto.TrackFilter) ([]dto.TrackDeleted, error)
func (*Track) GetHistory ¶
Click to show internal directories.
Click to hide internal directories.