Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(dsn string, schema string) error

Types

type DB

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

func NewDB added in v0.7.1

func NewDB(ctx context.Context, dsn string) (*DB, error)

func (*DB) AddPlayedAlbum

func (d *DB) AddPlayedAlbum(ctx context.Context, album unification.AlbumFull) error

func (*DB) AddPlayedPageEntry added in v0.5.2

func (d *DB) AddPlayedPageEntry(ctx context.Context, pageEntry streaming.PageEntry) error

func (*DB) AddPlayedPlaylist added in v0.5.2

func (d *DB) AddPlayedPlaylist(ctx context.Context, playlist unification.PlaylistFull) error

func (*DB) AddPlayedPopular added in v0.5.2

func (d *DB) AddPlayedPopular(ctx context.Context, artist unification.ArtistFull) error

func (*DB) AddPlaylist

func (d *DB) AddPlaylist(ctx context.Context, title, description string) error

func (*DB) AddRadio added in v0.4.5

func (d *DB) AddRadio(ctx context.Context, title, url string, imageURL *string) error

func (*DB) AddStreamingAlbum

func (d *DB) AddStreamingAlbum(ctx context.Context, album streaming.AlbumFull) error

func (*DB) AddStreamingArtist

func (d *DB) AddStreamingArtist(ctx context.Context, artist streaming.Artist) error

func (*DB) AddStreamingTrackToPlaylist

func (d *DB) AddStreamingTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, track streaming.Track) error

func (*DB) AddTrackToPlaylist

func (d *DB) AddTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, trackID uuid.UUID) error

func (*DB) DeleteFileTrack

func (d *DB) DeleteFileTrack(ctx context.Context, id uuid.UUID) error

func (*DB) DeletePlaylist added in v0.4.5

func (d *DB) DeletePlaylist(ctx context.Context, id uuid.UUID) error

func (*DB) DeleteRadio added in v0.4.5

func (d *DB) DeleteRadio(ctx context.Context, id uuid.UUID) error

func (*DB) DeleteStreamingAlbum added in v0.5.2

func (d *DB) DeleteStreamingAlbum(ctx context.Context, id uuid.UUID) error

func (*DB) DeleteStreamingArtist added in v0.6.0

func (d *DB) DeleteStreamingArtist(ctx context.Context, id uuid.UUID) error

func (*DB) EditRadio added in v0.5.1

func (d *DB) EditRadio(ctx context.Context, id uuid.UUID, title, url string, imageURL *string) error

func (*DB) EditRadioImage added in v0.5.1

func (d *DB) EditRadioImage(ctx context.Context, id uuid.UUID, image []byte) error

func (*DB) GetAlbumFull

func (d *DB) GetAlbumFull(ctx context.Context, id uuid.UUID) (library.AlbumFull, error)

func (*DB) GetAlbumImage added in v0.4.1

func (d *DB) GetAlbumImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetAllFileTracks

func (d *DB) GetAllFileTracks(ctx context.Context) ([]library.Track, error)

func (*DB) GetArtistFull

func (d *DB) GetArtistFull(ctx context.Context, id uuid.UUID) (library.ArtistFull, error)

func (*DB) GetArtistImage added in v0.4.1

func (d *DB) GetArtistImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetFileTrack

func (d *DB) GetFileTrack(ctx context.Context, path string) (library.Track, error)

func (*DB) GetLastRun

func (d *DB) GetLastRun(ctx context.Context) (time.Time, error)

func (*DB) GetPlayedAlbumImage added in v0.4.1

func (d *DB) GetPlayedAlbumImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetPlayedPlaylistImage added in v0.5.2

func (d *DB) GetPlayedPlaylistImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetPlayedPopularImage added in v0.5.2

func (d *DB) GetPlayedPopularImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetPlaylistFull

func (d *DB) GetPlaylistFull(ctx context.Context, id uuid.UUID) (library.PlaylistFull, error)

func (*DB) GetPlaylistImage added in v0.4.1

func (d *DB) GetPlaylistImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetRadio added in v0.4.5

func (d *DB) GetRadio(ctx context.Context, id uuid.UUID) (library.Radio, error)

func (*DB) GetRadioImage added in v0.4.5

func (d *DB) GetRadioImage(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*DB) GetStreamingAlbum

func (d *DB) GetStreamingAlbum(ctx context.Context, id string) (library.Album, error)

func (*DB) GetStreamingAlbumFull

func (d *DB) GetStreamingAlbumFull(ctx context.Context, id string) (library.AlbumFull, error)

func (*DB) GetStreamingArtist

func (d *DB) GetStreamingArtist(ctx context.Context, id string) (library.Artist, error)

func (*DB) GetStreamingArtistFull

func (d *DB) GetStreamingArtistFull(ctx context.Context, id string) (library.ArtistFull, error)

func (*DB) GetTrack

func (d *DB) GetTrack(ctx context.Context, id uuid.UUID) (library.Track, error)

func (*DB) ImportStreamingPlaylist added in v0.4.1

func (d *DB) ImportStreamingPlaylist(ctx context.Context, playlist streaming.PlaylistFull, title string) error

func (*DB) ListAlbums

func (d *DB) ListAlbums(ctx context.Context, opt library.ListOpt) ([]library.AlbumWithArtists, error)

func (*DB) ListArtists

func (d *DB) ListArtists(ctx context.Context, opt library.ListOpt) ([]library.Artist, error)

func (*DB) ListPlayedAlbums

func (d *DB) ListPlayedAlbums(ctx context.Context, opt library.ListOpt) ([]library.PlayedAlbum, error)

func (*DB) ListPlayedPageEntries added in v0.5.2

func (d *DB) ListPlayedPageEntries(ctx context.Context, opt library.ListOpt) ([]library.PlayedPageEntry, error)

func (*DB) ListPlayedPlaylists added in v0.5.2

func (d *DB) ListPlayedPlaylists(ctx context.Context, opt library.ListOpt) ([]library.PlayedPlaylist, error)

func (*DB) ListPlayedPopulars added in v0.5.2

func (d *DB) ListPlayedPopulars(ctx context.Context, opt library.ListOpt) ([]library.PlayedPopular, error)

func (*DB) ListPlayedRadios added in v0.5.2

func (d *DB) ListPlayedRadios(ctx context.Context, opt library.ListOpt) ([]library.PlayedRadio, error)

func (*DB) ListPlaylists

func (d *DB) ListPlaylists(ctx context.Context, opt library.ListOpt) ([]library.Playlist, error)

func (*DB) ListRadios added in v0.4.5

func (d *DB) ListRadios(ctx context.Context, opt library.ListOpt) ([]library.Radio, error)

func (*DB) Search

func (d *DB) Search(ctx context.Context, query string, limit int) (library.SearchRes, error)

func (*DB) SetLastRun

func (d *DB) SetLastRun(ctx context.Context, time time.Time) error

func (*DB) SyncFileTrack

func (d *DB) SyncFileTrack(ctx context.Context, track files.TrackFull) error

func (*DB) UpdateRadioPlayed added in v0.6.1

func (d *DB) UpdateRadioPlayed(ctx context.Context, radio library.Radio) error

type Option added in v0.2.1

type Option func(*DB)

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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