config

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config loads the CLI configuration (Immich server origin and API key).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server is the origin of the Immich instance (e.g. https://immich.example.com/).
	// It must NOT include the /api base path; the client appends it.
	Server string
	// APIKey is sent as the x-api-key header on every request.
	APIKey string
	// Tools holds paths to optional external binaries used by client
	// workflows for local processing (e.g. ImageMagick for --resize).
	Tools Tools
}

Config holds the settings required to talk to an Immich server.

func Load

func Load(path string) (*Config, error)

Load reads the YAML config file at path. The environment variables IMMICH_SERVER, IMMICH_API_KEY, IMMICH_IMAGEMAGICK_PATH, and IMMICH_FFMPEG_PATH override the file values.

type Tools

type Tools struct {
	// ImageMagickPath is the path to the ImageMagick executable ("magick"
	// for v7+, or "convert" for legacy v6) used by
	// `client-workflow download-album --resize`.
	ImageMagickPath string
	// FFmpegPath is the path to the ffmpeg executable used by
	// `client-workflow download-album --resize-video-preset`.
	FFmpegPath string
}

Tools holds explicit paths to external executables used by client workflows. Any field left empty falls back to a PATH lookup at the point of use (see e.g. workflows.ResolveImageMagickPath) — nothing here is required unless the corresponding feature is actually used.

Jump to

Keyboard shortcuts

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