document

package
v0.0.0-...-9c73dfc Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleMaster = "ROLE_MASTER"
	RoleAdmin  = "ROLE_ADMIN"
	RoleUser   = "ROLE_USER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	Id        bson.ObjectId `json:"id" bson:"_id"`
	Name      string        `json:"name" bson:"name"`
	Tracks    []Track       `json:"tracks" bson:"tracks"`
	Artist    Artist        `json:"artist" bson:"-"`
	ArtistRef bson.ObjectId `json:"-" bson:"artist"`
	Cover     Image         `json:"cover" bson:"cover"`
	Year      int           `json:"year" bson:"year"`
}

func (Album) TrackExist

func (a Album) TrackExist(nbTrack int) bool

type Artist

type Artist struct {
	Id    bson.ObjectId `json:"id" bson:"_id"`
	Name  string        `json:"name" bson:"name"`
	Image Image         `json:"image" bson:"image"`
}

type Image

type Image struct {
	Original string `json:"original" bson:"original"`
	Small    string `json:"small" bson:"small"`
	Medium   string `json:"medium" bson:"medium"`
	Large    string `json:"large" bson:"large"`
}

type Key

type Key struct {
	Id        bson.ObjectId `json:"id" bson:"_id"`
	AppKey    string        `json:"app_key" bson:"app_key"`
	AppSecret string        `json:"app_secret" bson:"app_secret"`
	Roles     []string      `json:"roles" bson:"roles"`
}

type Track

type Track struct {
	Number     int             `json:"number" bson:"number"`
	Name       string          `json:"name" bson:"name"`
	ArtistsRef []bson.ObjectId `json:"artists" bson:"artists"`
	Duration   int             `json:"duration" bson:"duration"`
	Bpm        int             `json:"bpm" bson:"bpm"`
	Path       string          `json:"path" bson:"path"`
	Url        string          `json:"url" bson:"url"`
}

Jump to

Keyboard shortcuts

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