Documentation ¶
Overview ¶
Package models contains the models for gLyrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lyrics ¶
type Lyrics struct { Url string `json:"url"` Title string `json:"title"` Artist string `json:"artist"` Lyrics string `json:"lyrics"` ReleaseDate time.Time `json:"release_date,omitempty"` Origin *LyricsOrigin `json:"origin,omitempty"` }
Lyrics represents a song's lyrics and metadata. The object is JSONifiable.
type LyricsOrigin ¶
LyricsOrigin contains metadata regarding the extractor which extracted the lyrics.
type Request ¶
type Request struct { Url string // contains filtered or unexported fields }
Request is a wrapper around a url which makes it easy to access the data it points to.
func NewRequest ¶
NewRequest creates a new request and initialises it with the provided url.
func (*Request) Close ¶
func (req *Request) Close()
Close performs cleanup for the Request. This is a no-op if the Request doesn't need cleanup
func (*Request) Document ¶
Document returns a goquery.Document for the Request.Response The Document is internally cached.
func (*Request) Request ¶
Request creates an http.Request (GET) for the url and returns it. The request is internally cached so calling this method multiple times will return the same http.Request.