2020-12-25 14:39:50 +00:00
|
|
|
package common
|
|
|
|
|
2022-11-18 23:25:43 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"io"
|
|
|
|
)
|
2022-11-18 23:25:40 +00:00
|
|
|
|
2022-11-21 23:08:10 +00:00
|
|
|
type StreamDecoder interface {
|
|
|
|
Decrypt(buf []byte, offset int)
|
|
|
|
}
|
|
|
|
|
2020-12-25 14:39:50 +00:00
|
|
|
type Decoder interface {
|
2020-12-25 18:53:28 +00:00
|
|
|
Validate() error
|
2022-11-18 23:25:43 +00:00
|
|
|
io.Reader
|
2020-12-25 14:39:50 +00:00
|
|
|
}
|
|
|
|
|
2022-11-18 23:25:40 +00:00
|
|
|
type CoverImageGetter interface {
|
|
|
|
GetCoverImage(ctx context.Context) ([]byte, error)
|
|
|
|
}
|
|
|
|
|
2022-11-21 23:08:10 +00:00
|
|
|
type AudioMeta interface {
|
2020-12-25 14:39:50 +00:00
|
|
|
GetArtists() []string
|
|
|
|
GetTitle() string
|
|
|
|
GetAlbum() string
|
|
|
|
}
|
2022-11-18 23:25:43 +00:00
|
|
|
|
2022-11-21 23:08:10 +00:00
|
|
|
type AudioMetaGetter interface {
|
|
|
|
GetAudioMeta(ctx context.Context) (AudioMeta, error)
|
2022-11-18 23:25:43 +00:00
|
|
|
}
|