docs: document packages, exported API and non-obvious logic

This commit is contained in:
Mathis Maquenne
2026-08-06 13:04:10 +02:00
parent 5dfd832d0d
commit b1ad9b4904
41 changed files with 757 additions and 7 deletions
+9
View File
@@ -1,5 +1,14 @@
package deezer
// Resource is a downloadable Deezer page: an Album, Playlist, Artist or
// Single. Implementations differ only in how they decode the gw-light
// response and where they place their output, so the accessors are
// intentionally thin and are not documented individually.
//
// The unexported decode method seals the interface. Only the four types in
// this package can satisfy it, which lets Kind.newResource stay an exhaustive
// switch and guarantees FetchResource never receives an implementation whose
// wire format it does not know.
type Resource interface {
Title() string
Tracks() []*Track