Documentation
¶
Index ¶
- Variables
- func UpgradeDb(db *DB) error
- type Album
- type AlbumStore
- type Camera
- type CameraStore
- type Comment
- type CommentStore
- type DB
- func (db *DB) AddAlbum(name, description, coverpic string) (*Album, error)
- func (db *DB) AddCamera(c *Camera) error
- func (db *DB) AddCameraFromPhoto(p *Photo) error
- func (db *DB) AddComment(guestId uuid.UUID, driveId string, body string) (*Comment, error)
- func (db *DB) AddGuest(uuid uuid.UUID, g *Guest) error
- func (db *DB) AddLike(uuid uuid.UUID, driveId string) error
- func (db *DB) AddPhoto(p *Photo, exif *mexif.ExifCompact) error
- func (db *DB) Album(id int) (*Album, error)
- func (db *DB) AlbumPhotos(albumId int, filter PhotoFilter) ([]*Photo, error)
- func (db *DB) Albums() ([]*Album, error)
- func (db *DB) Camera(id string) (*Camera, error)
- func (db *DB) Cameras() ([]*Camera, error)
- func (db *DB) CloseDb() error
- func (db *DB) CreateAlbumStore() error
- func (db *DB) CreateCameraStore() error
- func (db *DB) CreateCommentStore() error
- func (db *DB) CreateDataStore() error
- func (db *DB) CreateGuestStore() error
- func (db *DB) CreateLikeStore() error
- func (db *DB) CreatePhotoStore() error
- func (db *DB) CreateUserStore() error
- func (db *DB) DeleteAlbum(id int) error
- func (db *DB) DeleteAlbumStore() error
- func (db *DB) DeleteCamera(id string) (bool, error)
- func (db *DB) DeleteCameraStore() error
- func (db *DB) DeleteCommentStore() error
- func (db *DB) DeleteDataStore() error
- func (db *DB) DeleteGuest(uuid uuid.UUID) (bool, error)
- func (db *DB) DeleteGuestStore() error
- func (db *DB) DeleteLike(uuid uuid.UUID, driveId string) error
- func (db *DB) DeleteLikeStore() error
- func (db *DB) DeleteLikes(uuid uuid.UUID) error
- func (db *DB) DeletePhoto(id string) (bool, error)
- func (db *DB) DeletePhotoStore() error
- func (db *DB) DeleteUserStore() error
- func (db *DB) Exif(id string) (*Exif, error)
- func (db *DB) Guest(uuid uuid.UUID) (*Guest, error)
- func (db *DB) GuestByEmail(email string) (*Guest, error)
- func (db *DB) GuestLikes(guest uuid.UUID) ([]string, error)
- func (db *DB) GuestUUID(email string) (*uuid.UUID, error)
- func (db *DB) HasAlbum(id int) bool
- func (db *DB) HasAlbumName(name string) bool
- func (db *DB) HasCamera(id string) bool
- func (db *DB) HasCameraModel(model string) bool
- func (db *DB) HasGuest(guest uuid.UUID) bool
- func (db *DB) HasGuestByEmail(email string) bool
- func (db *DB) HasGuestByName(name string) bool
- func (db *DB) HasPhoto(id string, private bool) bool
- func (db *DB) Like(guest uuid.UUID, driveId string) bool
- func (db *DB) Photo(id string, private bool) (*Photo, error)
- func (db *DB) PhotoAlbums(photoId string) ([]*Album, error)
- func (db *DB) PhotoComments(driveId string) ([]*Comment, error)
- func (db *DB) PhotoLikes(driveId string) ([]*Guest, error)
- func (db *DB) Photos(r Range, order PhotoOrder, filter PhotoFilter) ([]*Photo, error)
- func (db *DB) PopulateFromPhotos() error
- func (db *DB) SetPrivatePhoto(private bool, id string) (*Photo, error)
- func (db *DB) UpdateAlbum(album *Album) (*Album, error)
- func (db *DB) UpdateCamera(c *Camera) (*Camera, error)
- func (db *DB) UpdateCameraImage(image, id string) (*Camera, error)
- func (db *DB) UpdateGuest(uuid uuid.UUID, email string, name string) (*Guest, error)
- func (db *DB) UpdatePhoto(title string, description string, keywords []string, id string) (*Photo, error)
- func (db *DB) UpdatePhotoAlbums(album []int, photoId string) error
- func (db *DB) UpdateUser(u *User) (*User, error)
- func (db *DB) UpdateUserConfig(c string) error
- func (db *DB) User() (*User, error)
- func (db *DB) UserConfig() (string, error)
- func (db *DB) Verified(uuid uuid.UUID) (*Verify, error)
- func (db *DB) VerifyGuest(uuid uuid.UUID) (*Verify, error)
- type DataStore
- type Exif
- type Guest
- type GuestStore
- type LikeStore
- type Photo
- type PhotoFilter
- type PhotoOrder
- type PhotoStore
- type Range
- type User
- type UserStore
- type Verify
Constants ¶
This section is empty.
Variables ¶
View Source
var NoSuchCamera = errors.New("No such Photo Id")
View Source
var NoSuchPhoto = errors.New("No such Photo Id")
View Source
var Version = "development"
Functions ¶
Types ¶
type AlbumStore ¶
type AlbumStore interface { AddAlbum(name, description, coverpic string) (*Album, error) Album(id int) (*Album, error) Albums() ([]*Album, error) AlbumPhotos(albumId int, filter PhotoFilter) ([]*Photo, error) //CameraAlbums() ([]*Album, error) //CameraAlbum(cameraModel string) (*Album, error) CreateAlbumStore() error DeleteAlbum(id int) error DeleteAlbumStore() error HasAlbum(id int) bool HasAlbumName(name string) bool PhotoAlbums(photoId string) ([]*Album, error) UpdateAlbum(album *Album) (*Album, error) UpdatePhotoAlbums(albumIds []int, photoId string) error }
type Camera ¶
type Camera struct { Id string `json:"id"` Model string `json:"model"` Make string `json:"make"` Year int `json:"year"` EffectivePixels int `json:"effectivePixels"` TotalPixels int `json:"totalPixels"` SensorSize string `json:"sensorSize"` SensorType string `json:"sensorType"` SensorResolution string `json:"sensorResolution"` ImageResolution string `json:"imageResolution"` CropFactor float32 `json:"cropFactor"` OpticalZoom float32 `json:"opticalZoom"` DigitalZoom bool `json:"digitalZoom"` Iso string `json:"iso"` Raw bool `json:"raw"` ManualFocus bool `json:"manualFocus"` FocusRange int `json:"focusRange"` MacroFocusRange int `json:"macroFocusRange"` FocalLengthEquiv string `json:"focalLengthEquiv"` AperturePriority bool `json:"aperturePriority"` MaxAperture string `json:"maxAperture"` MaxApertureEquiv string `json:"maxApertureEquiv"` Metering string `json:"metering"` ExposureComp string `json:"exposureComp"` ShutterPriority bool `json:"shutterPriority"` MinShutterSpeed string `json:"minShutterSpeed"` MaxShutterSpeed string `json:"maxShutterSpeed"` BuiltInFlash bool `json:"builtInFlash"` ExternalFlash bool `json:"externalFlash"` ViewFinder string `json:"viewFinder"` VideoCapture bool `json:"videoCapture"` MaxVideoResolution string `json:"maxVideoResolution"` Gps bool `json:"gps"` Image string `json:"image"` }
type CameraStore ¶
type CameraStore interface { AddCamera(camera *Camera) error AddCameraFromPhoto(photo *Photo) error CreateCameraStore() error Camera(id string) (*Camera, error) Cameras() ([]*Camera, error) DeleteCamera(id string) (bool, error) DeleteCameraStore() error HasCamera(id string) bool HasCameraModel(model string) bool PopulateFromPhotos() error UpdateCamera(camera *Camera) (*Camera, error) UpdateCameraImage(img, id string) (*Camera, error) }
type CommentStore ¶
type DB ¶
func (*DB) AddCameraFromPhoto ¶
func (*DB) AddComment ¶
func (*DB) AlbumPhotos ¶
func (db *DB) AlbumPhotos(albumId int, filter PhotoFilter) ([]*Photo, error)
func (*DB) CreateAlbumStore ¶
func (*DB) CreateCameraStore ¶
func (*DB) CreateCommentStore ¶
func (*DB) CreateDataStore ¶
func (*DB) CreateGuestStore ¶
func (*DB) CreateLikeStore ¶
func (*DB) CreatePhotoStore ¶
func (*DB) CreateUserStore ¶
func (*DB) DeleteAlbum ¶
func (*DB) DeleteAlbumStore ¶
func (*DB) DeleteCameraStore ¶
func (*DB) DeleteCommentStore ¶
func (*DB) DeleteDataStore ¶
func (*DB) DeleteGuestStore ¶
func (*DB) DeleteLikeStore ¶
func (*DB) DeletePhotoStore ¶
func (*DB) DeleteUserStore ¶
func (*DB) HasAlbumName ¶
func (*DB) HasCameraModel ¶
func (*DB) HasGuestByEmail ¶
func (*DB) HasGuestByName ¶
func (*DB) Photos ¶
func (db *DB) Photos(r Range, order PhotoOrder, filter PhotoFilter) ([]*Photo, error)
func (*DB) PopulateFromPhotos ¶
func (*DB) UpdateGuest ¶
func (*DB) UpdatePhoto ¶
func (*DB) UpdateUser ¶
Todo: Make this update more clear (i.e. cannot update drive relevant stuff
func (*DB) UpdateUserConfig ¶
func (*DB) UserConfig ¶
type DataStore ¶
type DataStore interface { PhotoStore AlbumStore UserStore GuestStore CommentStore LikeStore CameraStore CreateDataStore() error DeleteDataStore() error CloseDb() error }
type Exif ¶
type Exif struct { DriveId string Data *mexif.ExifCompact }
type GuestStore ¶
type GuestStore interface { CreateGuestStore() error DeleteGuestStore() error AddGuest(id uuid.UUID, u *Guest) error DeleteGuest(id uuid.UUID) (bool, error) VerifyGuest(id uuid.UUID) (*Verify, error) Guest(id uuid.UUID) (*Guest, error) GuestByEmail(email string) (*Guest, error) GuestUUID(email string) (*uuid.UUID, error) HasGuest(id uuid.UUID) bool HasGuestByEmail(email string) bool HasGuestByName(name string) bool Verified(id uuid.UUID) (*Verify, error) UpdateGuest(guest uuid.UUID, email string, name string) (*Guest, error) }
type LikeStore ¶
type LikeStore interface { CreateLikeStore() error DeleteLikeStore() error AddLike(guest uuid.UUID, driveId string) error DeleteLike(guest uuid.UUID, driveId string) error DeleteLikes(guest uuid.UUID) error GuestLikes(guest uuid.UUID) ([]string, error) Like(guest uuid.UUID, driveId string) bool PhotoLikes(driveId string) ([]*Guest, error) }
type Photo ¶
type Photo struct { DriveId string `json:"driveId"` Md5 string `json:"md5"` FileName string `json:"fileName"` Title string `json:"title"` Keywords string `json:"keywords"` Description string `json:"description"` DriveDate time.Time `json:"driveDate"` OriginalDate time.Time `json:"originalDate"` CameraMake string `json:"cameraMake"` CameraModel string `json:"cameraModel"` LensMake string `json:"lensMake,omitempty"` LensModel string `json:"lensModel,omitempty"` FocalLength string `json:"focalLength"` FocalLength35 string `json:"focalLength35"` Iso uint `json:"iso"` Exposure string `json:"exposure"` FNumber float32 `json:"fNumber"` Width uint `json:"width"` Height uint `json:"height"` Private bool `json:"private"` Likes uint `json:"likes"` }
type PhotoFilter ¶
type PhotoStore ¶
type PhotoStore interface { AddPhoto(p *Photo, exif *mexif.ExifCompact) error CreatePhotoStore() error DeletePhoto(id string) (bool, error) DeletePhotoStore() error Exif(id string) (*Exif, error) HasPhoto(id string, private bool) bool Photo(id string, private bool) (*Photo, error) Photos(r Range, order PhotoOrder, filter PhotoFilter) ([]*Photo, error) SetPrivatePhoto(private bool, id string) (*Photo, error) UpdatePhoto(title string, description string, keywords []string, id string) (*Photo, error) }
Click to show internal directories.
Click to hide internal directories.