songusecase

package
v0.6.10-0...-926069d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 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 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 (u Usecase) CreateSong(ctx context.Context, authHeader string, song songentity.Song) (songentity.Song, *api.Error)

func (Usecase) DeleteSong

func (u Usecase) DeleteSong(ctx context.Context, authHeader string, songID string) *api.Error

func (Usecase) GetSong

func (u Usecase) GetSong(ctx context.Context, songID string) (songentity.Song, *api.Error)

func (Usecase) GetSongSummariesForUser

func (u Usecase) GetSongSummariesForUser(ctx context.Context, authHeader string, ownerID string) ([]songentity.SongSummary, *api.Error)

func (Usecase) UpdateSong

func (u Usecase) UpdateSong(ctx context.Context, authHeader string, songID string, song songentity.Song) (songentity.Song, *api.Error)

func (Usecase) VerifySongOwnerBySongID

func (u Usecase) VerifySongOwnerBySongID(ctx context.Context, authHeader string, songID string) *api.Error

Jump to

Keyboard shortcuts

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