Documentation ¶
Index ¶
- Constants
- Variables
- func AlbumHash(name string) uniq.Hash
- type Album
- type AlbumImageAdder
- type AlbumImageDeleter
- type AlbumImageFinder
- type AlbumSettings
- type ChronoText
- type Exif
- type Gps
- type Gpx
- type GpxSettings
- type Image
- type ImageIndexer
- type ImageSettings
- type IndexingFlags
- type MapTile
- type Thumb
- type ThumbSize
- type Thumbnailer
Constants ¶
View Source
const ( Orphan = "orphan-photos" Broken = "broken-photos" )
Names of special "albums".
Variables ¶
View Source
var ThumbSizes = []ThumbSize{"2400w", "1200w", "600w", "300w", "200h", "400h"}
Functions ¶
Types ¶
type Album ¶
type Album struct { uniq.Head Title string `db:"title" json:"title" formType:"textarea" title:"Title" description:"Title of an album."` Name string `db:"name" json:"name" title:"Name" required:"true" readOnly:"true" description:"A slug value that is used in album URL."` Public bool `` /* 138-byte string literal not displayed */ Hidden bool `` /* 145-byte string literal not displayed */ CoverImage uniq.Hash `db:"cover_image" json:"cover_image,omitempty" title:"Cover Image" description:"Hash of image to use as a cover."` Settings AlbumSettings `db:"settings" json:"settings" title:"Settings" description:"Additional parameters for an album."` // contains filtered or unexported fields }
type AlbumImageAdder ¶
type AlbumImageDeleter ¶
type AlbumImageFinder ¶
type AlbumImageFinder interface { FindImages(ctx context.Context, albumHash uniq.Hash) ([]Image, error) FindPreviewImages(ctx context.Context, albumHash uniq.Hash, coverImage uniq.Hash, limit uint64) ([]Image, error) FindOrphanImages(ctx context.Context) ([]Image, error) FindBrokenImages(ctx context.Context) ([]Image, error) FindImageAlbums(ctx context.Context, excludeAlbum uniq.Hash, imageHashes ...uniq.Hash) (map[uniq.Hash][]Album, error) }
type AlbumSettings ¶
type AlbumSettings struct { Description string `json:"description,omitempty" formType:"textarea" title:"Description" description:"Description of an album, can contain HTML."` GpxTracksHashes []uniq.Hash `json:"gpx_tracks_hashes,omitempty" title:"GPX track hashes"` NewestFirst bool `json:"newest_first,omitempty" title:"Newest first" description:"Show newest images at the top."` Texts []ChronoText `json:"texts,omitempty" title:"Chronological texts"` }
func (*AlbumSettings) Scan ¶
func (s *AlbumSettings) Scan(src any) error
type ChronoText ¶
type Exif ¶
type Exif struct { uniq.Head Rating int `db:"rating" json:"rating" title:"Rating" minimum:"0" maximum:"5"` ExposureTime string `db:"exposure_time" json:"exposure_time" title:"Exposure"` ExposureTimeSec float64 `db:"exposure_time_sec" json:"exposure_time_sec" title:"Exposure (sec.)"` FNumber float64 `db:"f_number" json:"f_number" title:"Aperture"` FocalLength float64 `db:"focal_length" json:"focal_length" title:"Focal length"` ISOSpeed int `db:"iso_speed" json:"iso_speed" title:"ISO"` LensModel string `db:"lens_model" json:"lens_model" title:"Lens"` CameraMake string `db:"camera_make" json:"camera_make" title:"Manufacturer"` CameraModel string `db:"camera_model" json:"camera_model" title:"Camera"` Software string `db:"software" json:"software" title:"Software"` Digitized *time.Time `db:"digitized" json:"digitized" title:"Digitized"` ProjectionType string `db:"projection_type" json:"projection_type" title:"Projection" description:"Use 'equirectangular' for 360 panorama."` }
type GpxSettings ¶
type GpxSettings struct { Name string `json:"name,omitempty"` MinLat float64 `json:"minLat"` MinLon float64 `json:"minLon"` MaxLat float64 `json:"maxLat"` MaxLon float64 `json:"maxLon"` }
func (*GpxSettings) Scan ¶
func (s *GpxSettings) Scan(src any) error
type Image ¶
type Image struct { uniq.File Width int64 `db:"width" title:"Width, px" json:"width" readOnly:"true"` Height int64 `db:"height" title:"Height, px" json:"height" readOnly:"true"` BlurHash string `db:"blurhash" title:"BlurHash" json:"blurhash" readOnly:"true"` PHash uniq.Hash `db:"phash" title:"PerceptionHash" json:"phash" readonly:"true"` // uniq.Hash is used JSON accuracy. TakenAt *time.Time `db:"taken_at" title:"Taken At" json:"taken_at"` Settings ImageSettings `db:"settings" json:"settings" title:"Settings" description:"Additional parameters for an album."` }
type ImageIndexer ¶
type ImageSettings ¶
type ImageSettings struct {
Description string `json:"description,omitempty" formType:"textarea" title:"Description" description:"Description of an image, can contain HTML."`
}
func (*ImageSettings) Scan ¶
func (s *ImageSettings) Scan(src any) error
TODO: generalize scanner with generics.
type IndexingFlags ¶
type Thumb ¶
type Thumb struct { uniq.Head Width uint `db:"width"` Height uint `db:"height"` Data []byte `db:"data"` FilePath string `db:"file_path"` }
func (Thumb) ReadSeeker ¶
func (t Thumb) ReadSeeker() io.ReadSeeker
Click to show internal directories.
Click to hide internal directories.