web

package
v0.0.0-...-7c1ce7f Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyChangesRequest

type ApplyChangesRequest struct {
	PageID  string            `json:"page_id"`
	Changes []ApplyFileChange `json:"changes"`
}

type ApplyChangesResponse

type ApplyChangesResponse struct {
	Applied []string     `json:"applied"`
	Errors  []ApplyError `json:"errors"`
}

type ApplyError

type ApplyError struct {
	Path  string `json:"path"`
	Error string `json:"error"`
}

type ApplyFileChange

type ApplyFileChange struct {
	Path         string   `json:"path"`
	ExifTime     *string  `json:"exif_time,omitempty"`
	ExifOffset   *string  `json:"exif_offset,omitempty"`
	GPSTime      *string  `json:"gps_time,omitempty"`
	GPSLatitude  *float64 `json:"gps_latitude,omitempty"`
	GPSLongitude *float64 `json:"gps_longitude,omitempty"`
}

type ApplyStartResponse

type ApplyStartResponse struct {
	TaskID string `json:"task_id"`
}

type DirectoryBrowseResponse

type DirectoryBrowseResponse struct {
	Path      string                 `json:"path"`
	Separator string                 `json:"separator"`
	Segments  []xplat.PathSegment    `json:"segments"`
	Entries   []xplat.DirectoryEntry `json:"entries"`
	Error     string                 `json:"error,omitempty"`
}

type DirectorySelectorState

type DirectorySelectorState struct {
	Path      string
	Separator string
	Segments  []xplat.PathSegment
	Entries   []xplat.DirectoryEntry
	Error     string
}

type GPSLogWriteRequest

type GPSLogWriteRequest struct {
	Entries []model.GPSLogEntry `json:"entries"`
}

type GPSLogWriteResponse

type GPSLogWriteResponse struct {
	Written int `json:"written"`
	Total   int `json:"total"`
}

type GeoLookupCandidate

type GeoLookupCandidate struct {
	Label       string    `json:"label"`
	Latitude    float64   `json:"latitude"`
	Longitude   float64   `json:"longitude"`
	BoundingBox []float64 `json:"bounding_box,omitempty"`
	Class       string    `json:"class,omitempty"`
	Type        string    `json:"type,omitempty"`
}

type GeoLookupRequest

type GeoLookupRequest struct {
	Query string `json:"query"`
	Limit int    `json:"limit,omitempty"`
}

type GeoLookupResponse

type GeoLookupResponse struct {
	Candidates []GeoLookupCandidate `json:"candidates"`
}

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers(reg *mtr.Registry, st *store.Store, cfg PageConfig, initial InitialState, hub *progress.Hub, geocoder *nominatim.Client, geocoderLimiter *rate.Limiter) *Handlers

func (*Handlers) Apply

func (h *Handlers) Apply(w http.ResponseWriter, r *http.Request)

func (*Handlers) BrowseDirectories

func (h *Handlers) BrowseDirectories(w http.ResponseWriter, r *http.Request)

func (*Handlers) GPSLog

func (h *Handlers) GPSLog(w http.ResponseWriter, r *http.Request)

func (*Handlers) GeoLookup

func (h *Handlers) GeoLookup(w http.ResponseWriter, r *http.Request)

func (*Handlers) Healthz

func (h *Handlers) Healthz(w http.ResponseWriter, r *http.Request)

func (*Handlers) Image

func (h *Handlers) Image(w http.ResponseWriter, r *http.Request)

func (*Handlers) Index

func (h *Handlers) Index(w http.ResponseWriter, r *http.Request)

func (*Handlers) InspectExif

func (h *Handlers) InspectExif(w http.ResponseWriter, r *http.Request)

func (*Handlers) Load

func (h *Handlers) Load(w http.ResponseWriter, r *http.Request)

func (*Handlers) Pane

func (h *Handlers) Pane(w http.ResponseWriter, r *http.Request)

func (*Handlers) ProgressWS

func (h *Handlers) ProgressWS(w http.ResponseWriter, r *http.Request)

func (*Handlers) TimezoneOffsets

func (h *Handlers) TimezoneOffsets(w http.ResponseWriter, r *http.Request)

type HeaderPathSegment

type HeaderPathSegment struct {
	Label     string
	Path      string
	URL       string
	Current   bool
	Clickable bool
}

type InitialState

type InitialState struct {
	TargetPhotos    []model.Photo
	ReferencePhotos []model.Photo
	TargetError     error
	ReferenceError  error
}

type InspectExifResponse

type InspectExifResponse struct {
	Path string         `json:"path"`
	Data map[string]any `json:"data"`
}

type LoadRequest

type LoadRequest struct {
	PageID    string   `json:"page_id"`
	Side      string   `json:"side"`
	Paths     []string `json:"paths"`
	Recursive bool     `json:"recursive"`
}

type LoadResponse

type LoadResponse struct {
	TaskID string `json:"task_id"`
}

type PageConfig

type PageConfig struct {
	Debug             bool
	TargetPaths       []string
	ReferencePaths    []string
	DefaultBrowsePath string
	Recursive         bool
	RefreshMetadata   bool
	Workers           int
	BatchSize         int
	PreviewMaxSize    int64
}

type PanePhotoModel

type PanePhotoModel struct {
	ID             string     `json:"id"`
	Order          int        `json:"order"`
	Side           model.Side `json:"side"`
	BaseName       string     `json:"basename"`
	Path           string     `json:"path"`
	RelativePath   string     `json:"relative_path"`
	Size           int64      `json:"size"`
	ModTime        string     `json:"modtime"`
	Resolution     string     `json:"resolution"`
	ExifTime       string     `json:"exif_time"`
	BaseExifTime   string     `json:"base_exif_time"`
	ExifOffset     string     `json:"exif_offset"`
	BaseExifOffset string     `json:"base_exif_offset"`
	GPSTime        string     `json:"gps_time"`
	BaseGPSTime    string     `json:"base_gps_time"`
	GPSTimeZone    string     `json:"gps_timezone"`
	ExifGPS        string     `json:"exif_gps"`
	BaseExifGPS    string     `json:"base_exif_gps"`
	GPSLat         string     `json:"gps_lat"`
	GPSLon         string     `json:"gps_lon"`
	BaseGPSLat     string     `json:"base_gps_lat"`
	BaseGPSLon     string     `json:"base_gps_lon"`
	Aperture       string     `json:"aperture"`
	Exposure       string     `json:"exposure"`
	FocalLength    string     `json:"focal_length"`
	ISO            string     `json:"iso"`
	MeteringMode   string     `json:"metering_mode"`
	CameraModel    string     `json:"camera_model"`
	ThumbnailURL   string     `json:"thumbnail_url"`
}

type PaneRenderData

type PaneRenderData struct {
	SectionSide      string
	Key              string
	HeaderTitle      string
	PreviewLabel     string
	EmptyStateText   string
	TimezoneLabel    string
	QueryName        string
	SelectorLabel    string
	Browser          bool
	Paths            []string
	Selector         DirectorySelectorState
	Recursive        bool
	Photos           []model.Photo
	Error            string
	DirPath          string
	DirSegments      []HeaderPathSegment
	BrowseURL        string
	PaneSummary      string
	PictureViewTotal int
	ModelJSON        template.JS
}

type TimezoneLookupEntry

type TimezoneLookupEntry struct {
	ID        string   `json:"id"`
	Timezone  string   `json:"timezone,omitempty"`
	Latitude  *float64 `json:"latitude,omitempty"`
	Longitude *float64 `json:"longitude,omitempty"`
	LocalTime string   `json:"local_time,omitempty"`
	Instant   string   `json:"instant,omitempty"`
}

type TimezoneLookupRequest

type TimezoneLookupRequest struct {
	Entries []TimezoneLookupEntry `json:"entries"`
}

type TimezoneLookupResponse

type TimezoneLookupResponse struct {
	Results []TimezoneLookupResult `json:"results"`
}

type TimezoneLookupResult

type TimezoneLookupResult struct {
	ID        string `json:"id"`
	Offset    string `json:"offset,omitempty"`
	LocalTime string `json:"local_time,omitempty"`
	Error     string `json:"error,omitempty"`
}

type ViewState

type ViewState struct {
	PageID               string
	TargetPaths          []string
	ReferencePaths       []string
	Recursive            bool
	TargetBrowser        bool
	ReferenceBrowser     bool
	TargetSelector       DirectorySelectorState
	ReferenceSelector    DirectorySelectorState
	TargetPhotos         []model.Photo
	ReferencePhotos      []model.Photo
	TargetError          error
	ReferenceError       error
	TargetDirPath        string
	ReferenceDirPath     string
	TargetDirSegments    []HeaderPathSegment
	ReferenceDirSegments []HeaderPathSegment
	TargetBrowseURL      string
	ReferenceBrowseURL   string
}

Jump to

Keyboard shortcuts

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