22 lines
331 B
Go
Raw Normal View History

2020-12-25 22:39:50 +08:00
package common
2022-11-19 07:25:40 +08:00
import "context"
2020-12-25 22:39:50 +08:00
type Decoder interface {
2020-12-26 02:53:28 +08:00
Validate() error
2020-12-25 22:39:50 +08:00
Decode() error
GetAudioData() []byte
GetAudioExt() string
2020-12-26 00:49:03 +08:00
GetMeta() Meta
2020-12-25 22:39:50 +08:00
}
2022-11-19 07:25:40 +08:00
type CoverImageGetter interface {
GetCoverImage(ctx context.Context) ([]byte, error)
}
2020-12-25 22:39:50 +08:00
type Meta interface {
GetArtists() []string
GetTitle() string
GetAlbum() string
}