Documentation
¶
Index ¶
- type Album
- type Asset
- func (a *Asset) AddTag(tag string)
- func (a *Asset) Close() error
- func (a Asset) DeviceAssetID() string
- func (a *Asset) GetChecksum() (string, error)
- func (a Asset) LogValue() slog.Value
- func (a *Asset) MergeAlbums(a2 []Album)
- func (a *Asset) MergeTags(t2 []Tag)
- func (a *Asset) OpenFile() (osfs.OSFS, error)
- func (a *Asset) SetNameInfo(ni NameInfo)
- func (a *Asset) UseMetadata(md *Metadata) *Metadata
- type Group
- type GroupBy
- type Kind
- type Metadata
- type NameInfo
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { ID string `json:"-"` // The album ID Title string `json:"title,omitempty"` // either the directory base name, or metadata Description string `json:"description,omitempty"` // As found in the metadata Latitude float64 `json:"latitude,omitempty"` // As found in the metadata Longitude float64 `json:"longitude,omitempty"` // As found in the metadata }
type Asset ¶
type Asset struct { // File system and file name File fshelper.FSAndName FileDate time.Time // File creation date ID string // Immich ID after upload Checksum string // Hash of the file as delivered by Immich // Common fields OriginalFileName string // File name as delivered to Immich/Google Description string // Google Photos may a have description FileSize int // File size in bytes // Metadata for the process and the upload to Immich CaptureDate time.Time // Date of the capture Trashed bool // The asset is trashed Archived bool // The asset is archived FromPartner bool // the asset comes from a partner Favorite bool // the asset is marked as favorite Rating int // the asset is marked with stars Albums []Album // List of albums the asset is in Tags []Tag // List of tags the asset is tagged with // Information inferred from the original file name NameInfo FromSideCar *Metadata // Metadata extracted from a sidecar file (XMP or JSON) FromSourceFile *Metadata // Metadata extracted from the file content (embedded metadata) FromApplication *Metadata // Metadata extracted from the application that created the file // GPS location Latitude float64 // GPS latitude Longitude float64 // GPS longitude // contains filtered or unexported fields }
func (Asset) DeviceAssetID ¶
func (*Asset) GetChecksum ¶ added in v0.24.7
GetChecksum returns the checksum of the asset. If the checksum is already set, it returns it. Otherwise, it computes it. Use this method to get the checksum of an asset.
func (*Asset) MergeAlbums ¶
func (*Asset) SetNameInfo ¶
func (*Asset) UseMetadata ¶
type Group ¶
type Group struct { Assets []*Asset Removed []removed Grouping GroupBy CoverIndex int // index of the cover assert in the Assets slice }
func (*Group) RemoveAsset ¶
RemoveAsset remove an asset from the group
type Metadata ¶
type Metadata struct { File fshelper.FSAndName `json:"-"` // File name and file system that holds the metadata. Could be empty FileName string `json:"fileName,omitempty"` // File name as presented to users Latitude float64 `json:"latitude,omitempty"` // GPS Longitude float64 `json:"longitude,omitempty"` // GPS FileDate time.Time `json:"fileDate,omitzero"` // Date of the file DateTaken time.Time `json:"dateTaken,omitzero"` // Date of exposure Description string `json:"description,omitempty"` // Long description Albums []Album `json:"albums,omitempty"` // Used to list albums that contain the file Tags []Tag `json:"tags,omitempty"` // Used to list tags Rating byte `json:"rating,omitempty"` // 0 to 5 Trashed bool `json:"trashed,omitempty"` // Flag to indicate if the image has been trashed Archived bool `json:"archived,omitempty"` // Flag to indicate if the image has been archived Favorited bool `json:"favorited,omitempty"` // Flag to indicate if the image has been favorited FromPartner bool `json:"fromPartner,omitempty"` // Flag to indicate if the image is from a partner }
func UnMarshalMetadata ¶
type NameInfo ¶
type NameInfo struct { Base string // base name (with extension) Ext string // extension Radical string // base name usable for grouping photos Type string // type of the asset video, image Kind Kind // type of the series Index int // index of the asset in the series Taken time.Time // date taken IsCover bool // is this is the cover if the series IsModified bool // is this is a modified version of the original }
Click to show internal directories.
Click to hide internal directories.