Documentation
¶
Index ¶
- func New() model.DataStore
- func NewAlbumRepository(ctx context.Context, o orm.Ormer) model.AlbumRepository
- func NewArtistRepository(ctx context.Context, o orm.Ormer) model.ArtistRepository
- func NewGenreRepository(ctx context.Context, o orm.Ormer) model.GenreRepository
- func NewMediaFileRepository(ctx context.Context, o orm.Ormer) *mediaFileRepository
- func NewMediaFolderRepository(ctx context.Context, o orm.Ormer) model.MediaFolderRepository
- func NewPlayerRepository(ctx context.Context, o orm.Ormer) model.PlayerRepository
- func NewPlaylistRepository(ctx context.Context, o orm.Ormer) model.PlaylistRepository
- func NewPropertyRepository(ctx context.Context, o orm.Ormer) model.PropertyRepository
- func NewTranscodingRepository(ctx context.Context, o orm.Ormer) model.TranscodingRepository
- func NewUserRepository(ctx context.Context, o orm.Ormer) model.UserRepository
- func ToStruct(m map[string]interface{}, rec interface{}, fieldNames []string) error
- type MockAlbum
- func (m *MockAlbum) Exists(id string) (bool, error)
- func (m *MockAlbum) FindByArtist(artistId string) (model.Albums, error)
- func (m *MockAlbum) Get(id string) (*model.Album, error)
- func (m *MockAlbum) GetAll(qo ...model.QueryOptions) (model.Albums, error)
- func (m *MockAlbum) SetData(j string, size int)
- func (m *MockAlbum) SetError(err bool)
- type MockArtist
- type MockDataStore
- func (db *MockDataStore) Album(context.Context) model.AlbumRepository
- func (db *MockDataStore) Artist(context.Context) model.ArtistRepository
- func (db *MockDataStore) GC(ctx context.Context) error
- func (db *MockDataStore) Genre(context.Context) model.GenreRepository
- func (db *MockDataStore) MediaFile(context.Context) model.MediaFileRepository
- func (db *MockDataStore) MediaFolder(context.Context) model.MediaFolderRepository
- func (db *MockDataStore) Player(context.Context) model.PlayerRepository
- func (db *MockDataStore) Playlist(context.Context) model.PlaylistRepository
- func (db *MockDataStore) Property(context.Context) model.PropertyRepository
- func (db *MockDataStore) Resource(ctx context.Context, m interface{}) model.ResourceRepository
- func (db *MockDataStore) Transcoding(context.Context) model.TranscodingRepository
- func (db *MockDataStore) User(context.Context) model.UserRepository
- func (db *MockDataStore) WithTx(block func(db model.DataStore) error) error
- type MockMediaFile
- type SQLStore
- func (s *SQLStore) Album(ctx context.Context) model.AlbumRepository
- func (s *SQLStore) Artist(ctx context.Context) model.ArtistRepository
- func (s *SQLStore) GC(ctx context.Context) error
- func (s *SQLStore) Genre(ctx context.Context) model.GenreRepository
- func (s *SQLStore) MediaFile(ctx context.Context) model.MediaFileRepository
- func (s *SQLStore) MediaFolder(ctx context.Context) model.MediaFolderRepository
- func (s *SQLStore) Player(ctx context.Context) model.PlayerRepository
- func (s *SQLStore) Playlist(ctx context.Context) model.PlaylistRepository
- func (s *SQLStore) Property(ctx context.Context) model.PropertyRepository
- func (s *SQLStore) Resource(ctx context.Context, m interface{}) model.ResourceRepository
- func (s *SQLStore) Transcoding(ctx context.Context) model.TranscodingRepository
- func (s *SQLStore) User(ctx context.Context) model.UserRepository
- func (s *SQLStore) WithTx(block func(tx model.DataStore) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAlbumRepository ¶
func NewArtistRepository ¶
func NewGenreRepository ¶
func NewMediaFileRepository ¶
func NewPlayerRepository ¶ added in v0.10.0
func NewPlaylistRepository ¶
func NewPropertyRepository ¶
func NewTranscodingRepository ¶ added in v0.10.0
func NewUserRepository ¶
Types ¶
type MockAlbum ¶
type MockAlbum struct {
model.AlbumRepository
Options model.QueryOptions
// contains filtered or unexported fields
}
func CreateMockAlbumRepo ¶
func CreateMockAlbumRepo() *MockAlbum
func (*MockAlbum) FindByArtist ¶
type MockArtist ¶
type MockArtist struct {
model.ArtistRepository
// contains filtered or unexported fields
}
func CreateMockArtistRepo ¶
func CreateMockArtistRepo() *MockArtist
func (*MockArtist) SetData ¶
func (m *MockArtist) SetData(j string, size int)
func (*MockArtist) SetError ¶
func (m *MockArtist) SetError(err bool)
type MockDataStore ¶
type MockDataStore struct {
MockedGenre model.GenreRepository
MockedAlbum model.AlbumRepository
MockedArtist model.ArtistRepository
MockedMediaFile model.MediaFileRepository
MockedUser model.UserRepository
MockedPlayer model.PlayerRepository
MockedTranscoding model.TranscodingRepository
}
func (*MockDataStore) Album ¶
func (db *MockDataStore) Album(context.Context) model.AlbumRepository
func (*MockDataStore) Artist ¶
func (db *MockDataStore) Artist(context.Context) model.ArtistRepository
func (*MockDataStore) Genre ¶
func (db *MockDataStore) Genre(context.Context) model.GenreRepository
func (*MockDataStore) MediaFile ¶
func (db *MockDataStore) MediaFile(context.Context) model.MediaFileRepository
func (*MockDataStore) MediaFolder ¶
func (db *MockDataStore) MediaFolder(context.Context) model.MediaFolderRepository
func (*MockDataStore) Player ¶ added in v0.10.0
func (db *MockDataStore) Player(context.Context) model.PlayerRepository
func (*MockDataStore) Playlist ¶
func (db *MockDataStore) Playlist(context.Context) model.PlaylistRepository
func (*MockDataStore) Property ¶
func (db *MockDataStore) Property(context.Context) model.PropertyRepository
func (*MockDataStore) Resource ¶
func (db *MockDataStore) Resource(ctx context.Context, m interface{}) model.ResourceRepository
func (*MockDataStore) Transcoding ¶ added in v0.10.0
func (db *MockDataStore) Transcoding(context.Context) model.TranscodingRepository
func (*MockDataStore) User ¶
func (db *MockDataStore) User(context.Context) model.UserRepository
type MockMediaFile ¶
type MockMediaFile struct {
model.MediaFileRepository
// contains filtered or unexported fields
}
func CreateMockMediaFileRepo ¶
func CreateMockMediaFileRepo() *MockMediaFile
func (*MockMediaFile) FindByAlbum ¶
func (m *MockMediaFile) FindByAlbum(artistId string) (model.MediaFiles, error)
func (*MockMediaFile) SetData ¶
func (m *MockMediaFile) SetData(j string, size int)
func (*MockMediaFile) SetError ¶
func (m *MockMediaFile) SetError(err bool)
type SQLStore ¶
type SQLStore struct {
// contains filtered or unexported fields
}
func (*SQLStore) MediaFile ¶
func (s *SQLStore) MediaFile(ctx context.Context) model.MediaFileRepository
func (*SQLStore) MediaFolder ¶
func (s *SQLStore) MediaFolder(ctx context.Context) model.MediaFolderRepository
func (*SQLStore) Player ¶ added in v0.10.0
func (s *SQLStore) Player(ctx context.Context) model.PlayerRepository
func (*SQLStore) Playlist ¶
func (s *SQLStore) Playlist(ctx context.Context) model.PlaylistRepository
func (*SQLStore) Property ¶
func (s *SQLStore) Property(ctx context.Context) model.PropertyRepository
func (*SQLStore) Resource ¶
func (s *SQLStore) Resource(ctx context.Context, m interface{}) model.ResourceRepository
func (*SQLStore) Transcoding ¶ added in v0.10.0
func (s *SQLStore) Transcoding(ctx context.Context) model.TranscodingRepository
Source Files
¶
- album_repository.go
- artist_repository.go
- genre_repository.go
- helpers.go
- mediafile_repository.go
- mediafolders_repository.go
- mock_album_repo.go
- mock_artist_repo.go
- mock_mediafile_repo.go
- mock_persistence.go
- persistence.go
- player_repository.go
- playlist_repository.go
- property_repository.go
- sql_annotations.go
- sql_base_repository.go
- sql_search.go
- transcoding_repository.go
- user_repository.go
Click to show internal directories.
Click to hide internal directories.