Documentation
¶
Overview ¶
Package api implements the /api/v1/ REST handlers for monbooru.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gallery ¶ added in v1.1.0
type Gallery struct {
Name string
GalleryPath string
ThumbnailsPath string
DB *db.DB
TagSvc *tags.Service
RelationsSvc *relations.Service
InvalidateCaches func()
// VisibleCount / TagCount return the cached non-missing-image and
// non-alias-tag counts (the same values the Settings page shows). May
// be nil; listGalleries falls back to a direct query then.
VisibleCount func() (int, error)
TagCount func() (int, error)
}
Gallery is what API handlers need to act on a single gallery. InvalidateCaches is called after every image add/delete; may be nil.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the root handler for all /api/v1/ routes.
type ResolverFunc ¶ added in v1.1.0
ResolverFunc resolves a gallery by name. Empty name = active gallery.
Click to show internal directories.
Click to hide internal directories.