models

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QpPagiStart    = "start"
	QpPagiCount    = "count"
	QpShort        = "short"
	QpOrder        = "order"
	QpSearchByName = "search_by_name"
	QpTags         = "tags"
	QpNotTags      = "not_tags"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Album added in v0.0.2

type Album struct {
	ID          int64  `json:"id,omitempty"`
	Year        int16  `json:"year,omitempty"`
	TotalTracks int16  `json:"total_tracks,omitempty"`
	DiscNumber  int16  `json:"disc_number,omitempty"`
	Name        string `json:"name,omitempty"`
	Image       string `json:"image,omitempty"`
	Description string `json:"description,omitempty"`
}

Album is a music album

type AlbumWithArtists added in v0.0.2

type AlbumWithArtists struct {
	Album   *Album    `json:"album"`
	Artists []*Artist `json:"artists"`
}

AlbumWithArtists each album with artist

type Artist added in v0.0.2

type Artist struct {
	ID          int64  `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Image       string `json:"image,omitempty"`
	Description string `json:"description,omitempty"`
}

Artist is a artist of the album/track

type Genre added in v0.0.2

type Genre struct {
	ID          int64  `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

Genre is a music genre

type JSONErrorMessage

type JSONErrorMessage struct {
	Error string `json:"error"`
}

JSONErrorMessage message with error description

type MusicUploadRespone added in v0.0.2

type MusicUploadRespone struct {
	TaskID int64 `json:"task_id"`
}

MusicUploadRespone contains task id with music file process

type Pagination added in v0.0.2

type Pagination struct {
	Start int64
	Count int64
}

Pagination of the request

type Tag added in v0.0.2

type Tag struct {
	ID          int64  `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Value       string `json:"value,omitempty"`
	Description string `json:"description,omitempty"`
}

Tag of the track, album or artist. Value may be empty

type TagVariant added in v0.0.2

type TagVariant struct {
	ID          int64  `json:"id,omitempty"`
	Value       string `json:"value,omitempty"`
	Description string `json:"description,omitempty"`
}

TagVariant element of the list of id, value and description fields

type TagWithVariants added in v0.0.2

type TagWithVariants struct {
	Name     string        `json:"name,omitempty"`
	Variants []*TagVariant `json:"variants,omitempty"`
}

TagWithValuesList is a tag grouped by ID and Name

type Task added in v0.0.2

type Task struct {
	ID        int64  `json:"id,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	UserID    int64  `json:"user_id,omitempty"`
	TrackID   int64  `json:"track_id,omitempty"`
	Status    string `json:"status,omitempty"`
	ErrorText string `json:"error_text,omitempty"`
}

Task is a tasker type

type Track added in v0.0.2

type Track struct {
	ID         int64  `json:"id,omitempty"`
	Duration   int64  `json:"duration,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	Number     int16  `json:"number,omitempty"`
	FileMiddle string `json:"file_middle,omitempty"`
	FileHigh   string `json:"file_high,omitempty"`
	Name       string `json:"name,omitempty"`
	Lyrics     string `json:"lyrics,omitempty"`
}

Track is a music tracks

type TrackWithAlbumArtists added in v0.0.2

type TrackWithAlbumArtists struct {
	Track   *Track    `json:"track"`
	Album   *Album    `json:"album,omitempty"`
	Artists []*Artist `json:"artists"`
}

type TrackWithGenresAlbumArtists added in v0.0.2

type TrackWithGenresAlbumArtists struct {
	Track   *Track    `json:"track"`
	Album   *Album    `json:"album"`
	Artists []*Artist `json:"artists"`
	Genres  []*Genre  `json:"genres"`
}

TrackWithGenresAlbumArtist each track with genre list, album and artist info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL