queries

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAllNotifications added in v0.0.4

func ClearAllNotifications(c Conf, username string) error

ClearAllNotifications marks all notifications as read for a user

func GetNotifications added in v0.0.4

func GetNotifications(c Conf, username string) ([]notify.Notification, error)

GetNotifications retrievesall notifications

func GetTagTitle

func GetTagTitle(key string, c Conf) (string, error)

GetTagTitle returns the title of a tag given the tag's key.

func GetTotalFavorites

func GetTotalFavorites(rating int, c Conf) (int, error)

GetTotalFavorites returns the total number of media items with a rating of 5.

func GetTotalFolders

func GetTotalFolders(c Conf) (int, error)

GetTotalFolders returns the total of all folders.

func GetTotalMediaItems

func GetTotalMediaItems(rating int, from, to, camera, lens string, c Conf) (int, error)

GetTotalMediaItems returns the number of media items.

func GetTotalOfFolder

func GetTotalOfFolder(group, name string, c Conf) (int, error)

GetTotalOfFolder returns the total of media items in a folder.

func GetTotalOfTag

func GetTotalOfTag(group string, c Conf) (int, error)

GetTotalOfTag returns the number of media items with a given exif tag.

func GetTotalTags

func GetTotalTags(c Conf) (int, error)

GetTotalTags returns the number of tags.

func MarkNotificationRead added in v0.0.4

func MarkNotificationRead(c Conf, id int64, username string) error

MarkNotificationRead marks a notification as read for a user

func Notify added in v0.0.4

func Notify(c Conf, message string, status string) error

Notify sends a notification to all users and subscribers

Types

type ApiCredentials

type ApiCredentials = types.ApiCredentials

func GetAllKeys

func GetAllKeys(c Conf) ([]ApiCredentials, error)

GetAllKeys returns a list of all hashed keys.

type Conf

type Conf = types.Conf

type DatabaseMedia

type DatabaseMedia = types.DatabaseMedia

type Day

type Day = types.Day

type Days

type Days = types.Days

func GetMemories added in v0.0.4

func GetMemories(c Conf) (Days, error)

GetMemories returns media items that occurred on the today's date in previous years and groups them into years.

type Directory

type Directory = types.Directory

type FilterParams

type FilterParams = types.FilterParams

type Folder

type Folder = types.Folder

type FolderMedia

type FolderMedia = types.FolderMedia

type GearItem

type GearItem = types.GearItem

type GearItems

type GearItems = types.GearItems

func GetGear

func GetGear(column string, c Conf) (GearItems, error)

GetGear returns the total unique counts for a specified gear column.

type MapItem

type MapItem = types.MapItem

func GetMapItems

func GetMapItems(c Conf) ([]MapItem, error)

GetMapItems returns all media items' coordinates.

type Media

type Media = types.Media

func GetFavorites

func GetFavorites(pageSize, offset, rating int, params FilterParams, c Conf) ([]Media, error)

GetFavorites returns media items with a rating of 5.

func GetFolder

func GetFolder(group, name string, pageSize, offset int, params FilterParams, c Conf) ([]Media, error)

GetFolder returns the media items in a folder.

func GetMediaItems

func GetMediaItems(offset int, direction string, total int, c Conf) ([]Media, error)

GetMediaItems returns all media items for use in scanning.

func GetSingleMediaItem

func GetSingleMediaItem(hash uint32, c Conf) (Media, error)

GetSingleMediaItem retrieves a single media item by hash from the database.

func GetTag

func GetTag(offset int, direction string, pageSize int, group, name string, c Conf) ([]Media, error)

GetTag returns media items with a given exif tag.

type MediaCollection

type MediaCollection struct {
	Items []Media
}

type Meta added in v0.0.4

type Meta struct {
	Total      int    `json:"total"`
	PageSize   int    `json:"pagesize"`
	NextCursor string `json:"nextCursor"`
}

type Photo added in v0.0.4

type Photo struct {
	Id uint32 `json:"id"`
	W  int    `json:"w"`
	H  int    `json:"h"`
	C  string `json:"c"`
	T  string `json:"t,omitempty"`
	D  string `json:"d"` // YYYY-MM-DD
}

type PrevNext

type PrevNext = types.PrevNext

func GetNext

func GetNext(date time.Time, hash uint32, total int, params FilterParams, previous []PrevNext, c Conf) ([]PrevNext, error)

GetNext returns the media items after the current media item in chronological order.

func GetPrevious

func GetPrevious(date time.Time, hash uint32, params FilterParams, c Conf) ([]PrevNext, error)

GetPrevious returns the media items before the current media item in chronological order.

type RawMinimalMedia

type RawMinimalMedia = types.RawMinimalMedia

type Subject

type Subject = types.Subject

type Subjects

type Subjects = types.Subjects

func GetTags

func GetTags(group, direction string, c Conf) (Subjects, error)

GetTags returns all tags.

type TimelineItem added in v0.0.4

type TimelineItem struct {
	Date  string `json:"date"`
	Count int    `json:"count"`
}

type TimelineResponse added in v0.0.4

type TimelineResponse struct {
	Meta     Meta           `json:"meta"`
	Timeline []TimelineItem `json:"timeline"`
	Photos   []Photo        `json:"photos"`
}

func GetTimeline

func GetTimeline(params *FilterParams, c Conf) (*TimelineResponse, error)

GetTimeline returns media items in the new cursor-based format.

type TreeNode

type TreeNode = types.TreeNode

func GetFolders

func GetFolders(params FilterParams, group string, pageSize, offset int, c Conf) ([]*TreeNode, error)

GetFolders returns a list of folders organized in a tree structure.

Jump to

Keyboard shortcuts

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