Documentation ¶
Overview ¶
Package common provides shared types and utilities for the immich-kiosk application
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // shared context Context context.Context SharedSecret string )
Functions ¶
func Initialize ¶ added in v0.14.4
func Initialize() error
Initialize sets up the application context and shared secret. It ensures initialization occurs only once using sync.Once. Returns any errors that occurred during initialization.
func InitializeSecret ¶
func InitializeSecret() error
InitializeSecret generates and sets the shared secret used for application security. The shared secret is used for authenticating and validating requests between components. Generation occurs only once through sync.Once synchronization to prevent duplicate secrets. The generated secret is stored in the SharedSecret global variable. Returns an error if the secret generation process 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