Documentation
¶
Index ¶
- Constants
- Variables
- type Album
- func CreateAlbum(db *gorp.DbMap, Title string, Description string, ViewType string) (*Album, error)
- func ListAlbums(db *gorp.DbMap, ViewType *string) ([]*Album, error)
- func LoadAlbumFromID(db *gorp.DbMap, ID int64) (*Album, error)
- func LoadPhotosByDate(db *gorp.DbMap, Year int64, Month int64) (*Album, error)
- type Photo
- type Populated
Constants ¶
View Source
const ( // Const names to be retrievable from model code PUBLIC = "public" PRIVATE = "private" )
Variables ¶
View Source
var PathSeparator = fmt.Sprintf("%c", os.PathSeparator)
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct {
ID int64 `json:"id" db:"id"`
Title string `json:"title" db:"title"`
Description string `json:"description" db:"description"`
ViewType string `json:"view_type" db:"view_type"`
MiniatureWidth uint `json:"miniature_width" db:"miniatureWidth"`
MiniatureHeight uint `json:"miniature_height" db:"miniatureHeight"`
Photos []*Photo `db:"-"`
}
func CreateAlbum ¶
Create an icon
func LoadAlbumFromID ¶
Load album by ID
func LoadPhotosByDate ¶
type Photo ¶
type Photo struct {
ID int64 `json:"id" db:"id"`
AlbumId int64 `json:"album_id" db:"album_id"` // no multi album for now
LocalPath string `json:"local_path" db:"local_path"`
Description string `json:"description" db:"description"`
Md5Sum string `json:"md5sum" db:"md5sum"`
//Time mysql.NullTime `json:"time" db:"time"`
Time *time.Time `json:"time" db:"time"`
}
func CreatePhoto ¶
Create a photo
func LoadPhotoFromMd5 ¶
Load album by ID
Click to show internal directories.
Click to hide internal directories.