photo

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL = generic.LOCAL
	URL   = generic.URL
	UNSET = generic.UNSET
)

Variables

View Source
var DEFAULT = Configurations{
	Model:        "gpt-image-1",
	PromptFormat: "I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS: '%v'",
	Output: Output{
		Type:   UNSET,
		Dir:    fmt.Sprintf("%v/Pictures", os.Getenv("HOME")),
		Prefix: "clai",
	},
}

Functions

func ApplyFlagOverrides added in v1.11.0

func ApplyFlagOverrides(pConf *Configurations, f *Flags)

ApplyFlagOverrides applies the CLI flag values onto the file-loaded configuration (flags > file > default).

func Command added in v1.11.0

func Command(deps CommandDeps) *internal.Command

Command builds the photo command.

func CreateQuerier added in v1.11.0

func CreateQuerier(conf Configurations) (models.Querier, error)

CreateQuerier routes the model to a photo vendor querier.

func ValidateOutputType

func ValidateOutputType(outputType OutputType) error

ValidateOutputType is kind of dumb. Why did I add this..?

Types

type CommandDeps added in v1.11.0

type CommandDeps struct {
	ConfigPrep func() (confDir string, err error)
	LoadConfig func(confDir string) (Configurations, error)
}

CommandDeps are the composition-root collaborators: config loading (with the old-config migration) lives in internal/setup, which photo cannot import (setup imports photo), so internal/cli injects it.

type Configurations

type Configurations = generic.Configurations

The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).

type Flags added in v1.11.0

type Flags = internal.MediaFlags

Flags is the photo command's flag surface: the media group named for pictures.

func NewFlags added in v1.11.0

func NewFlags() Flags

NewFlags seeds the photo flag defaults.

type Output

type Output = generic.Output

The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).

type OutputType

type OutputType = generic.OutputType

The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).

Directories

Path Synopsis
Package generic holds photo's vendor-shared surface — the configuration types, image saving and the progress animation — below the vendor clients, so both vendors and internal/photo can import it (same layering as text with pkg/text/models).
Package generic holds photo's vendor-shared surface — the configuration types, image saving and the progress animation — below the vendor clients, so both vendors and internal/photo can import it (same layering as text with pkg/text/models).

Jump to

Keyboard shortcuts

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