refactor: use io.Reader instead of custom method

This commit is contained in:
Unlock Music Dev
2022-11-19 07:25:43 +08:00
parent 4365628bff
commit 67ff0c44cd
17 changed files with 420 additions and 460 deletions

View File

@@ -1,13 +1,13 @@
package common
import "context"
import (
"context"
"io"
)
type Decoder interface {
Validate() error
Decode() error
GetAudioData() []byte
GetAudioExt() string
GetMeta() Meta
io.Reader
}
type CoverImageGetter interface {
@@ -19,3 +19,7 @@ type Meta interface {
GetTitle() string
GetAlbum() string
}
type StreamDecoder interface {
Decrypt(buf []byte, offset int)
}