Documentation ¶
Index ¶
- type FreshlyFetchedSong
- type Usecase
- func (u Usecase) CreateSong(ctx context.Context, authHeader string, song songentity.Song) (songentity.Song, *api.Error)
- func (u Usecase) DeleteSong(ctx context.Context, authHeader string, songID string) *api.Error
- func (u Usecase) GetSong(ctx context.Context, songID string) (songentity.Song, *api.Error)
- func (u Usecase) GetSongSummariesForUser(ctx context.Context, authHeader string, ownerID string) ([]songentity.SongSummary, *api.Error)
- func (u Usecase) UpdateSong(ctx context.Context, authHeader string, songID string, song songentity.Song) (songentity.Song, *api.Error)
- func (u Usecase) VerifySongOwnerBySongID(ctx context.Context, authHeader string, songID string) *api.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FreshlyFetchedSong ¶
type FreshlyFetchedSong songentity.Song
this type alias is to make it very explicit that the input is for a song that was just fetched from the DB, not a song that was provided by the API caller. since they have the same type it can be easy to just thread it through. the caller must acknowledge this difference through an explicit cast
type Usecase ¶
type Usecase struct {
// contains filtered or unexported fields
}
func NewUsecase ¶
func NewUsecase(db songstorage.DB, userUsecase userusecase.Usecase) Usecase
func (Usecase) CreateSong ¶
func (Usecase) DeleteSong ¶
func (Usecase) GetSongSummariesForUser ¶
func (Usecase) UpdateSong ¶
Click to show internal directories.
Click to hide internal directories.