library

package
v0.0.0-...-4c8068f Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntLibraryService

type EntLibraryService struct {
	// contains filtered or unexported fields
}

func New

func New(client *ent.Client) *EntLibraryService

func (*EntLibraryService) AddSong

func (s *EntLibraryService) AddSong(ctx context.Context) (*ent.Song, error)

func (*EntLibraryService) CreateSong

func (s *EntLibraryService) CreateSong(ctx context.Context, path string, hash string) (*ent.Song, error)

func (*EntLibraryService) GetSong

func (s *EntLibraryService) GetSong(ctx context.Context, id int64) (*ent.Song, error)

func (*EntLibraryService) GetSongs

func (s *EntLibraryService) GetSongs(ctx context.Context) ([]*ent.Song, error)

func (*EntLibraryService) ImportSong

func (s *EntLibraryService) ImportSong(ctx context.Context, path string) (*ent.Song, error)

func (*EntLibraryService) RemoveSong

func (s *EntLibraryService) RemoveSong(ctx context.Context, id int64) error

type Service

type Service interface {
	ImportSong(ctx context.Context, path string) (*ent.Song, error)
	CreateSong(ctx context.Context, path string, hash string) (*ent.Song, error)
	GetSong(ctx context.Context, id int64) (*ent.Song, error)
	GetSongs(ctx context.Context) ([]*ent.Song, error)
	RemoveSong(ctx context.Context, id int64) error
}

Jump to

Keyboard shortcuts

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