routes

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package routes provides HTTP endpoint handlers for the Kiosk application.

It includes functions for rendering pages, handling API requests, and managing caching of page data. This package is responsible for defining the web routes and their corresponding handler functions.

Index

Constants

This section is empty.

Variables

View Source
var (
	KioskVersion string

	ViewDataCache *cache.Cache
)

Functions

func Clock

func Clock(baseConfig *config.Config) echo.HandlerFunc

Clock clock endpoint

func FlushCache added in v0.11.0

func FlushCache(c echo.Context) error

func Home

func Home(baseConfig *config.Config) echo.HandlerFunc

Home home endpoint

func NewImage

func NewImage(baseConfig *config.Config) echo.HandlerFunc

NewImage returns an echo.HandlerFunc that handles requests for new images. It manages image processing, caching, and prefetching based on the configuration.

func NewRawImage added in v0.10.0

func NewRawImage(baseConfig *config.Config) echo.HandlerFunc

NewRawImage returns an echo.HandlerFunc that handles requests for raw images. It processes the image without any additional transformations and returns it as a blob.

func ProcessViewImageData added in v0.11.0

func ProcessViewImageData(requestConfig config.Config, c echo.Context, isPrefetch bool) (views.ImageData, error)

func ProcessViewImageDataWithRatio added in v0.11.0

func ProcessViewImageDataWithRatio(imageOrientation immich.ImageOrientation, requestConfig config.Config, c echo.Context, isPrefetch bool) (views.ImageData, error)

func RefreshCheck added in v0.11.2

func RefreshCheck(baseConfig *config.Config) echo.HandlerFunc

RefreshCheck endpoint to check if device requires a refresh

func Render added in v0.4.0

func Render(ctx echo.Context, statusCode int, t templ.Component) error

This custom Render replaces Echo's echo.Context.Render() with templ's templ.Component.Render().

func RenderError added in v0.11.0

func RenderError(c echo.Context, err error, message string) error

func Sleep added in v0.11.0

func Sleep(baseConfig *config.Config) echo.HandlerFunc

Sleep sleep mode endpoint

Types

type PersonOrAlbum added in v0.5.0

type PersonOrAlbum struct {
	Type string
	ID   string
}

type RequestData added in v0.7.0

type RequestData struct {
	History []string `form:"history"`
	config.Config
}

Jump to

Keyboard shortcuts

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