models

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

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

Go to latest
Published: Jun 25, 2016 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlbumCollection string = "albums"

Functions

func PutAlbum

func PutAlbum(album *Album) error

Types

type Album

type Album struct {
	Id          int64   `bson:"_id" json:"_id" schema:"-"`
	Title       string  `bson:"title" json:"title" schema:"album_title_input"`
	Description string  `bson:"description" json:"description" schema:"album_desc_input"`
	Images      []Image `bson:"images" json:"images" schema:"frame"`
}

An album contains images and metadata

func GetAlbum

func GetAlbum(query bson.M) (error, Album)

type Image

type Image struct {
	Title       string `bson:"title" json:"title" schema:"title"`
	Description string `bson:"description" json:"description" schema:"description"`
	Link        string `bson:"link" json:"link" schema:"link"`
}

Jump to

Keyboard shortcuts

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