feat: replace text/template with templ and refactor code
This commit is contained in:
28
data/search.go
Normal file
28
data/search.go
Normal file
@ -0,0 +1,28 @@
|
||||
package data
|
||||
|
||||
type SearchResponse struct {
|
||||
Response struct {
|
||||
Sections sections
|
||||
}
|
||||
}
|
||||
|
||||
type result struct {
|
||||
ArtistNames string `json:"artist_names"`
|
||||
Title string
|
||||
Path string
|
||||
Thumbnail string `json:"song_art_image_thumbnail_url"`
|
||||
}
|
||||
|
||||
type hits []struct {
|
||||
Result result
|
||||
}
|
||||
|
||||
type sections []struct {
|
||||
Type string
|
||||
Hits hits
|
||||
}
|
||||
|
||||
type SearchResults struct {
|
||||
Query string
|
||||
Sections sections
|
||||
}
|
Reference in New Issue
Block a user