mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 21:48:18 -08:00
28 lines
676 B
Go
28 lines
676 B
Go
package images
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
type MockFinder struct{}
|
|
|
|
func (m *MockFinder) GetArtistImage(ctx context.Context, opts ArtistImageOpts) (string, error) {
|
|
return "", nil
|
|
}
|
|
|
|
func (m *MockFinder) GetAlbumImage(ctx context.Context, opts AlbumImageOpts) (string, error) {
|
|
return "", nil
|
|
}
|
|
func (m *MockFinder) Shutdown() {}
|
|
|
|
type ErrorFinder struct{}
|
|
|
|
func (m *ErrorFinder) GetArtistImage(ctx context.Context, opts ArtistImageOpts) (string, error) {
|
|
return "", errors.New("mock error")
|
|
}
|
|
|
|
func (m *ErrorFinder) GetAlbumImage(ctx context.Context, opts AlbumImageOpts) (string, error) {
|
|
return "", errors.New("mock error")
|
|
}
|
|
func (m *ErrorFinder) Shutdown() {}
|