model

package
v0.0.0-...-c5679b9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Username      string `json:"username"`
	ID            int    `json:"id"`
	AuthKey       string `json:"authKey"`
	PassKey       string `json:"passKey"`
	Notifications struct {
		Messages       int  `json:"messages"`
		Notifications  int  `json:"notifications"`
		NewAnnouncment bool `json:"newAnnouncment"`
		NewBlog        bool `json:"newBlog"`
	} `json:"notifications"`
	UserStats struct {
		Uploaded      int64   `json:"uploaded"`
		Downloaded    int64   `json:"downloaded"`
		Ratio         float64 `json:"ratio"`
		RequiredRatio float64 `json:"requiredRatio"`
		Class         string  `json:"class"`
	} `json:"userstats"`
}
type ArtistLink struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Collage

type Collage struct {
	ID                  int      `json:"id"`
	Name                string   `json:"name"`
	Description         string   `json:"description"`
	CreatorID           int      `json:"creatorID"`
	Deleted             bool     `json:"deleted"`
	CollageCategoryId   int      `json:"collageCategoryId"`
	CollageCategoryName string   `json:"collageCategoryName"`
	Locked              bool     `json:"locked"`
	MaxGroups           int      `json:"maxGroups"`
	MaxGroupsPerUser    int      `json:"maxGroupsPerUser"`
	HasBookmarked       bool     `json:"hasBookmarked"`
	SubscriberCount     int      `json:"subscriberCount"`
	TorrentGroupIDList  []string `json:"torrentGroupIDList,string" sql:"-"`
}

func (Collage) String

func (c Collage) String() string

type CollageWithGroups

type CollageWithGroups struct {
	Collage
	TorrentGroups []GroupWithTorrents `json:"torrentgroups" sql:"-"`
}

type CollagesTorrents

type CollagesTorrents struct {
	ID        int
	CollageID int
	GroupID   int
}

type Group

type Group struct {
	WikiBody            string    `json:"wikiBody"`
	WikiImage           string    `json:"wikiImage"`
	ID                  int       `json:"id"`
	Name                string    `json:"name"`
	Year                int       `json:"year"`
	RecordLabel         string    `json:"recordLabel"`
	CatalogueNumber     string    `json:"catalogueNumber"`
	ReleaseType         int       `json:"releaseType"`
	CategoryID          int       `json:"categoryId"`
	CategoryName        string    `json:"categoryName"`
	Time                string    `json:"time"`
	VanityHouse         bool      `json:"vanityHouse"`
	MusicInfo           MusicInfo `json:"musicInfo" sql:"-"`
	MusicInfoSerialized []byte    `json:"-" gorm:"type:text"`
	Tags                []string  `json:"tags" sql:"-"`
	TagsSerialized      []byte    `json:"-" gorm:"type:text"`
}

func (*Group) BeforeSave

func (g *Group) BeforeSave() (err error)

func (Group) String

func (g Group) String() string

type GroupAndTorrents

type GroupAndTorrents struct {
	Group    Group     `json:"group"`
	Torrents []Torrent `json:"torrents"`
}

func NormalizeTorrentGroups

func NormalizeTorrentGroups(v interface{}) ([]GroupAndTorrents, error)

func (GroupAndTorrents) Join

func (GroupAndTorrents) String

func (gt GroupAndTorrents) String() string

type GroupWithTorrents

type GroupWithTorrents struct {
	Group
	Torrents []Torrent `json:"torrents"`
}

func (GroupWithTorrents) Split

type MusicInfo

type MusicInfo struct {
	Composers []ArtistLink `json:"composers"`
	DJ        []ArtistLink `json:"dj"`
	Artists   []ArtistLink `json:"artists"`
	With      []ArtistLink `json:"with"`
	Conductor []ArtistLink `json:"conductor"`
	RemixedBy []ArtistLink `json:"remixedBy"`
	Producer  []ArtistLink `json:"producer"`
}

type Torrent

type Torrent struct {
	ID                      int    `json:"id"`
	GroupID                 int    `json:"groupID"`
	Media                   string `json:"media"`
	Format                  string `json:"format"`
	Encoding                string `json:"encoding"`
	Remastered              bool   `json:"remastered"`
	RemasterYear            int    `json:"remasterYear"`
	RemasterTitle           string `json:"remasterTitle"`
	RemasterRecordLabel     string `json:"remasterRecordLabel"`
	RemasterCatalogueNumber string `json:"remasterCatalogueNumber"`
	Scene                   bool   `json:"scene"`
	HasLog                  bool   `json:"hasLog"`
	HasCue                  bool   `json:"hasCue"`
	LogScore                int    `json:"logScore"`
	FileCount               int    `json:"fileCount"`
	Size                    int    `json:"size"`
	Seeders                 int    `json:"seeders"`
	Leechers                int    `json:"leechers"`
	Snatched                int    `json:"snatched"`
	FreeTorrent             bool   `json:"freeTorrent"`
	Time                    string `json:"time"`
	Description             string `json:"description"`
	FileList                string `json:"fileList"`
	FilePath                string `json:"filePath"`
	UserID                  int    `json:"userID"`
	Username                string `json:"username"`
}

func (Torrent) String

func (t Torrent) String() string

type TorrentAndGroup

type TorrentAndGroup struct {
	Torrent Torrent `json:"torrent"`
	Group   Group   `json:"group"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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