30 lines
438 B
Go
Raw Normal View History

2020-12-25 22:39:50 +08:00
package common
import (
"context"
"io"
)
2022-11-19 07:25:40 +08:00
2022-11-22 07:08:10 +08:00
type StreamDecoder interface {
Decrypt(buf []byte, offset int)
}
2020-12-25 22:39:50 +08:00
type Decoder interface {
2020-12-26 02:53:28 +08:00
Validate() error
io.Reader
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)
}
2022-11-22 07:08:10 +08:00
type AudioMeta interface {
2020-12-25 22:39:50 +08:00
GetArtists() []string
GetTitle() string
GetAlbum() string
}
2022-11-22 07:08:10 +08:00
type AudioMetaGetter interface {
GetAudioMeta(ctx context.Context) (AudioMeta, error)
}