immich

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetWithWeighting added in v0.10.0

type AssetWithWeighting struct {
	Asset  WeightedAsset
	Weight int
}

type ExifInfo added in v0.7.0

type ExifInfo struct {
	Make             string    `json:"-"` // `json:"make"`
	Model            string    `json:"-"` // `json:"model"`
	ExifImageWidth   int       `json:"-"` // `json:"exifImageWidth"`
	ExifImageHeight  int       `json:"-"` // `json:"exifImageHeight"`
	FileSizeInByte   int       `json:"-"` // `json:"fileSizeInByte"`
	Orientation      any       `json:"-"` // `json:"orientation"`
	DateTimeOriginal time.Time `json:"dateTimeOriginal"`
	ModifyDate       time.Time `json:"-"` // `json:"modifyDate"`
	TimeZone         string    `json:"-"` // `json:"timeZone"`
	LensModel        string    `json:"-"` // `json:"lensModel"`
	FNumber          float64   `json:"fNumber"`
	FocalLength      float64   `json:"focalLength"`
	Iso              int       `json:"iso"`
	ExposureTime     string    `json:"-"` // `json:"exposureTime"`
	Latitude         float64   `json:"-"` // `json:"latitude"`
	Longitude        float64   `json:"-"` // `json:"longitude"`
	City             string    `json:"city"`
	State            string    `json:"state"`
	Country          string    `json:"country"`
	Description      string    `json:"-"` // `json:"description"`
	ProjectionType   any       `json:"-"` // `json:"projectionType"`
}

type Faces added in v0.7.0

type Faces []struct {
	ID            string `json:"-"` // `json:"id"`
	ImageHeight   int    `json:"-"` // `json:"imageHeight"`
	ImageWidth    int    `json:"-"` // `json:"imageWidth"`
	BoundingBoxX1 int    `json:"-"` // `json:"boundingBoxX1"`
	BoundingBoxX2 int    `json:"-"` // `json:"boundingBoxX2"`
	BoundingBoxY1 int    `json:"-"` // `json:"boundingBoxY1"`
	BoundingBoxY2 int    `json:"-"` // `json:"boundingBoxY2"`
}

type ImmichAlbum

type ImmichAlbum struct {
	Assets []ImmichAsset `json:"assets"`
}

type ImmichApiCall added in v0.5.0

type ImmichApiCall func(string) ([]byte, error)

type ImmichAsset

type ImmichAsset struct {
	Retries          int
	ID               string    `json:"id"`
	DeviceAssetID    string    `json:"-"` // `json:"deviceAssetId"`
	OwnerID          string    `json:"-"` // `json:"ownerId"`
	DeviceID         string    `json:"-"` // `json:"deviceId"`
	LibraryID        string    `json:"-"` // `json:"libraryId"`
	Type             string    `json:"type"`
	OriginalPath     string    `json:"-"`                // `json:"originalPath"`
	OriginalFileName string    `json:"-"`                // `json:"originalFileName"`
	OriginalMimeType string    `json:"originalMimeType"` // `json:"originalMimeType"`
	Resized          bool      `json:"-"`                // `json:"resized"`
	Thumbhash        string    `json:"-"`                // `json:"thumbhash"`
	FileCreatedAt    time.Time `json:"-"`                // `json:"fileCreatedAt"`
	FileModifiedAt   time.Time `json:"-"`                // `json:"fileModifiedAt"`
	LocalDateTime    time.Time `json:"localDateTime"`    // `json:"localDateTime"`
	UpdatedAt        time.Time `json:"-"`                // `json:"updatedAt"`
	IsFavorite       bool      `json:"isFavorite"`
	IsArchived       bool      `json:"isArchived"`
	IsTrashed        bool      `json:"isTrashed"`
	Duration         string    `json:"-"` // `json:"duration"`
	ExifInfo         ExifInfo  `json:"exifInfo"`
	LivePhotoVideoID any       `json:"-"`        // `json:"livePhotoVideoId"`
	People           People    `json:"people"`   // `json:"people"`
	Checksum         string    `json:"checksum"` // `json:"checksum"`
	StackCount       any       `json:"-"`        // `json:"stackCount"`
	IsOffline        bool      `json:"-"`        // `json:"isOffline"`
	HasMetadata      bool      `json:"-"`        // `json:"hasMetadata"`
	DuplicateID      any       `json:"-"`        // `json:"duplicateId"`
}

func NewImage

func NewImage(base config.Config) ImmichAsset

NewImage returns a new image instance

func (*ImmichAsset) AlbumImageCount added in v0.10.0

func (i *ImmichAsset) AlbumImageCount(albumId, requestId string) (int, error)

func (*ImmichAsset) ImagePreview added in v0.10.0

func (i *ImmichAsset) ImagePreview() ([]byte, error)

ImagePreview fetches the raw image data from Immich

func (*ImmichAsset) PersonImageCount added in v0.10.0

func (i *ImmichAsset) PersonImageCount(personId, requestId string) (int, error)

PersonImageCount returns the number of images associated with a specific person in Immich.

func (*ImmichAsset) RandomImage added in v0.10.0

func (i *ImmichAsset) RandomImage(requestId, kioskDeviceId string, isPrefetch bool) error

GetRandomImage retrieve a random image from Immich

func (*ImmichAsset) RandomImageFromAlbum added in v0.10.0

func (i *ImmichAsset) RandomImageFromAlbum(albumId, requestId, kioskDeviceId string, isPrefetch bool) error

RandomImageFromAlbum retrieve random image within a specified album from Immich

func (*ImmichAsset) RandomImageOfPerson added in v0.10.0

func (i *ImmichAsset) RandomImageOfPerson(personId, requestId, kioskDeviceId string, isPrefetch bool) error

RandomImageOfPerson retrieve random image of person from Immich

type ImmichBuckets added in v0.9.0

type ImmichBuckets []struct {
	Count      int       `json:"count"`
	TimeBucket time.Time `json:"timeBucket"`
}

type ImmichError

type ImmichError struct {
	Message    []string `json:"message"`
	Error      string   `json:"error"`
	StatusCode int      `json:"statusCode"`
}

type ImmichPersonStatistics added in v0.10.0

type ImmichPersonStatistics struct {
	Assets int `json:"assets"`
}

type People added in v0.7.0

type People []struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	BirthDate     any       `json:"-"` // `json:"birthDate"`
	ThumbnailPath string    `json:"-"` // `json:"thumbnailPath"`
	IsHidden      bool      `json:"-"` // `json:"isHidden"`
	UpdatedAt     time.Time `json:"-"` // `json:"updatedAt"`
	Faces         Faces     `json:"-"` // `json:"faces"`
}

type WeightedAsset added in v0.10.0

type WeightedAsset struct {
	Type string
	ID   string
}

Jump to

Keyboard shortcuts

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