mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
initial Go port of streamrip
This commit is contained in:
32
internal/store/store.go
Normal file
32
internal/store/store.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package store
|
||||
|
||||
import "context"
|
||||
|
||||
type Database interface {
|
||||
IsDownloaded(ctx context.Context, id string) (bool, error)
|
||||
MarkDownloaded(ctx context.Context, id string) error
|
||||
MarkFailed(ctx context.Context, source, mediaType, id string) error
|
||||
Close() error
|
||||
}
|
||||
|
||||
type Dummy struct{}
|
||||
|
||||
func NewDummy() *Dummy {
|
||||
return &Dummy{}
|
||||
}
|
||||
|
||||
func (d *Dummy) IsDownloaded(context.Context, string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (d *Dummy) MarkDownloaded(context.Context, string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Dummy) MarkFailed(context.Context, string, string, string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Dummy) Close() error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user