song

package
v0.0.0-...-808094b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Messages = messages{
	CreateFailed:       "song_create_failed",
	FetchFailed:        "song_fetch_failed",
	ParseFailed:        "song_parse_failed",
	DeleteFailed:       "song_delete_failed",
	MarkListenedFailed: "song_mark_listened_failed",
}

Functions

This section is empty.

Types

type CreateDto

type CreateDto struct {
	Id      uuid.UUID `json:"-" neo4j:"id"`
	Title   string    `json:"title" neo4j:"title"`
	Artist  string    `json:"artist" neo4j:"artist"`
	GenreId uuid.UUID `json:"genreId" neo4j:"genreId"`
}

func (*CreateDto) Build

func (dto *CreateDto) Build() map[string]interface{}

type ListDto

type ListDto struct {
	Id     uuid.UUID `json:"id" neo4j:"id"`
	Title  string    `json:"title" neo4j:"title"`
	Artist string    `json:"artist" neo4j:"artist"`
}

type Repo

type Repo interface {
	List(ctx context.Context) ([]ListDto, *i18np.Error)
	ListByGenre(ctx context.Context, genreId uuid.UUID) ([]ListDto, *i18np.Error)
	ListUserRecommendation(ctx context.Context, userId uuid.UUID) ([]ListDto, *i18np.Error)
	View(ctx context.Context, id uuid.UUID) (*ListDto, *i18np.Error)
	Create(ctx context.Context, dto CreateDto) (*ListDto, *i18np.Error)
	Delete(ctx context.Context, id uuid.UUID) *i18np.Error
	MarkListened(ctx context.Context, userId, songId uuid.UUID) *i18np.Error
}

func NewRepo

func NewRepo(driver neo4j.DriverWithContext) Repo

Jump to

Keyboard shortcuts

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