Documentation
¶
Overview ¶
Package config loads the CLI configuration (Immich server origin and API key).
Index ¶
Constants ¶
const ClipProbeRepoURL = "https://github.com/dhcgn/immich-clip-probe/"
ClipProbeRepoURL is the setup reference for the external visual-similarity service. This is the first command that depends on a third-party service running next to Immich, so the URL is surfaced in help and errors.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClipProbe ¶ added in v0.19.0
ClipProbe holds the connection settings for the external visual-similarity service (https://github.com/dhcgn/immich-clip-probe/), which runs next to Immich. Server is the service origin (e.g. https://clip-probe.example.com/); the client appends /v1/similar. Token is the service's own API_TOKEN, not an Immich API key.
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
// ClipProbe holds the connection settings for the external
// immich-clip-probe service used by `client-workflow find-similar`.
// Optional globally — only find-similar requires it.
ClipProbe ClipProbe
}
Config holds the settings required to talk to an Immich server.
func Load ¶
Load reads the YAML config file at path. The environment variables IMMICH_SERVER, IMMICH_API_KEY, IMMICH_IMAGEMAGICK_PATH, IMMICH_FFMPEG_PATH, IMMICH_CLIP_PROBE_SERVER, and IMMICH_CLIP_PROBE_TOKEN override the file values.
func (*Config) ValidateClipProbe ¶ added in v0.19.0
ValidateClipProbe reports whether the clip-probe settings are usable by `client-workflow find-similar`. It is opt-in (not part of validate) so existing configs without a clip_probe section keep working.
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.