common

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package common provides shared types and utilities for the immich-kiosk application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common added in v0.19.0

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

func New added in v0.19.0

func New() *Common

func (*Common) Context added in v0.19.0

func (c *Common) Context() context.Context

func (*Common) Secret added in v0.19.0

func (c *Common) Secret() string

type ContextCopy added in v0.16.0

type ContextCopy struct {
	URL            url.URL     // The request URL
	RequestHeader  http.Header // Headers from the incoming request
	ResponseHeader http.Header // Headers for the outgoing response
}

ContextCopy stores a copy of key HTTP context information including URL and headers

func CopyContext added in v0.16.0

func CopyContext(c echo.Context) ContextCopy

CopyContext creates a copy of essential context data from an echo.Context This allows preserving context information without maintaining a reference to the original context Returns a ContextCopy containing the URL and header information

type RouteRequestData

type RouteRequestData struct {
	RequestConfig config.Config // Configuration for the current request
	DeviceID      string        // Unique identifier for the device making the request
	RequestID     string        // Unique identifier for this specific request
	ClientName    string        // Name of the client making the request
}

RouteRequestData contains request metadata and configuration used across routes

type ViewData

type ViewData struct {
	KioskVersion  string          // KioskVersion contains the current build version of Kiosk
	RequestID     string          // RequestID contains the unique identifier for the request
	DeviceID      string          // DeviceID contains the unique identifier for the device
	Assets        []ViewImageData // Assets contains the collection of assets to display in view
	Queries       url.Values      // Queries contains the URL query parameters
	CustomCSS     []byte          // CustomCSS contains custom CSS styling as bytes
	config.Config                 // Config contains the instance configuration
}

ViewData contains all the data needed to render a view in the application

type ViewImageData

type ViewImageData struct {
	ImmichAsset   immich.Asset // ImmichAsset contains immich asset data
	ImageData     string       // ImageData contains the image as base64 data
	ImageBlurData string       // ImageBlurData contains the blurred image as base64 data
	ImageDate     string       // ImageDate contains the date of the image
	User          string       // User the user api key used
}

ViewImageData contains the image data and metadata for displaying an image in the view

type ViewImageDataOptions added in v0.16.1

type ViewImageDataOptions struct {
	RelativeAssetWanted   bool
	RelativeAssetBucket   kiosk.Source
	RelativeAssetBucketID string
	ImageOrientation      immich.ImageOrientation
}

Jump to

Keyboard shortcuts

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