common

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var SharedSecret string

SharedSecret stores the application-wide shared secret string

View Source
var SharedSecretInit sync.Once

SharedSecretInit ensures SharedSecret is initialized only once

Functions

func InitializeSecret

func InitializeSecret() error

InitializeSecret generates and sets the shared secret for the application. It uses sync.Once to ensure the secret is only generated once. Returns an error if secret generation fails.

Types

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
	DeviceID      string          // DeviceID contains the unique identifier for the device
	Images        []ViewImageData // Images contains the collection of images 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 {
	ImmichImage   immich.ImmichAsset // ImmichImage 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
}

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

Jump to

Keyboard shortcuts

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