Documentation ¶
Index ¶
Constants ¶
const (
DateLayout = "02.01.2006"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filters ¶
type Filters struct {
// contains filtered or unexported fields
}
func (Filters) ToQueryParams ¶
type Library ¶
type Library struct { Songs []Song `json:"songs"` // Songs list Pagination Pagination `json:"pagination"` // Pagination }
Library contains filtered songs and pagination data. @Description Response with music library and pagination.
func (Library) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Library) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Library) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Library) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Lyrics ¶
type Lyrics struct { Lyrics string `json:"lyrics"` // Lyrics of the song Pagination Pagination `json:"pagination"` // Pagination }
Lyrics contains filtered lyrics and pagination for song. @Description Response with lyrics and pagination.
func (Lyrics) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Lyrics) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Lyrics) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Lyrics) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Pagination ¶
type RawFilters ¶
type RawFilters struct { Title string Group string ReleaseDate string Text string Link string Limit string Offset string }
func (RawFilters) ToFilters ¶
func (r RawFilters) ToFilters() (*Filters, error)
type Song ¶
type Song struct { ID uuid.UUID `json:"id"` // ID is a unique identifier for the song SongTitle SongDetail }
func (Song) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Song) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Song) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Song) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SongDetail ¶
type SongDetail struct { ReleaseDate string `json:"releaseDate"` // Realease date of song format: DD-MM-YYYY Text string `json:"text"` // Lyrics Link string `json:"link"` // Link to song }
SongDetail contains song details. @Description Additional song data.
func (SongDetail) MarshalEasyJSON ¶
func (v SongDetail) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SongDetail) MarshalJSON ¶
func (v SongDetail) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SongDetail) UnmarshalEasyJSON ¶
func (v *SongDetail) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SongDetail) UnmarshalJSON ¶
func (v *SongDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SongTitle ¶
type SongTitle struct { Group string `json:"group"` // Name of the band Song string `json:"song"` // Song title }
SongTitle contains song band and title. @Description Song band and title.
func (SongTitle) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (SongTitle) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*SongTitle) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SongTitle) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface