Documentation
¶
Index ¶
- type AccessRequest
- type Album
- type AlbumAccessDecision
- type AlbumEntry
- type AnnouncedAlbum
- type AnnouncedEntry
- type Chapter
- type EntryAccessDecision
- type Identity
- type ImmichFaceLink
- type Invitation
- type MailDelivery
- type MediaChapterResult
- type MediaFaceAssociation
- type MediaFaceRefresh
- type MediaItem
- type Moment
- type MomentAccessDecision
- type Person
- type Preauthorization
- type Session
- type UUID
- type UnsubscribeToken
- type UpdateNotification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRequest ¶
type AccessRequest struct {
bun.BaseModel `bun:"table:access_requests,alias:request"`
ID UUID `bun:"id,pk,type:uuid"`
Kind string
Provider string
Subject string
Email string
EmailVerified bool
DisplayName string
PersonID *UUID `bun:"person_id,type:uuid"`
AlbumID *UUID `bun:"album_id,type:uuid"`
Status string
SignInCount int
CreatedAt time.Time
UpdatedAt time.Time
ResolvedAt *time.Time
ResolvedBy *UUID `bun:"resolved_by,type:uuid"`
}
AccessRequest records who asked, never whether two identities share a human.
type Album ¶
type Album struct {
bun.BaseModel `bun:"table:albums,alias:album"`
ID UUID `bun:"id,pk,type:uuid"`
SourceID string
Title string
Description string
PublishedAt *time.Time
ImportStatus string
ImportMessage string
ImportProcessed int
ImportTotal int
ImportUpdatedAt time.Time
CreatedAt time.Time
}
Album includes its durable initial import intent and progress.
type AlbumAccessDecision ¶
type AlbumEntry ¶
type AlbumEntry struct {
bun.BaseModel `bun:"table:album_entries,alias:album_entry"`
ID UUID `bun:"id,pk,type:uuid"`
AlbumID UUID `bun:"type:uuid"`
MediaItemID UUID `bun:"type:uuid"`
MomentID *UUID `bun:"type:uuid"`
RemovedAt *time.Time
ExcludedAt *time.Time
}
AlbumEntry retains identity when membership is removed, without keeping an empty Moment. ExcludedAt marks a removed entry the Curator keeps out of this Album while the asset stays in the source album.
type AnnouncedAlbum ¶
type AnnouncedEntry ¶
type AnnouncedEntry struct {
bun.BaseModel `bun:"table:announced_entries,alias:announced_entry"`
PersonID UUID `bun:"person_id,pk,type:uuid"`
EntryID UUID `bun:"entry_id,pk,type:uuid"`
NotificationID *UUID `bun:"notification_id,type:uuid"`
AnnouncedAt time.Time
}
AnnouncedEntry is the lifetime association between a Person and an Album Entry. NotificationID names the Update Notification that announced it, and is nil for content added at Onboarding or dismissed without a notification.
type Chapter ¶
type Chapter struct {
Title string `json:"title"`
Start float64 `json:"start"`
End float64 `json:"end"`
}
Chapter is a read-only navigation segment in seconds from the start.
type EntryAccessDecision ¶
type ImmichFaceLink ¶
type Invitation ¶
type MailDelivery ¶
type MailDelivery struct {
bun.BaseModel `bun:"table:mail_deliveries,alias:delivery"`
ID UUID `bun:"id,pk,type:uuid"`
Kind string
Recipient string
Subject string
Body string
Status string
Attempts int
Message string
CreatedAt time.Time
UpdatedAt time.Time
DeliveredAt *time.Time
}
MailDelivery is Memento's authoritative delivery state; River rows are never exposed.
type MediaChapterResult ¶
type MediaChapterResult struct {
bun.BaseModel `bun:"table:media_chapter_results,alias:chapter_result"`
MediaItemID UUID `bun:"media_item_id,pk,type:uuid"`
Checksum string
Status string
Message string
Chapters []Chapter `bun:"chapters,type:jsonb"`
UpdatedAt time.Time
}
MediaChapterResult caches one Media Item's ffprobe outcome for the checksum it was probed at. A changed checksum replaces the row and requeues work.
type MediaFaceAssociation ¶
type MediaFaceRefresh ¶
type MediaItem ¶
type MediaItem struct {
bun.BaseModel `bun:"table:media_items,alias:media_item"`
ID UUID `bun:"id,pk,type:uuid"`
SourceID string
Checksum string
Filename string
Kind string
CapturedAt time.Time `bun:"type:timestamp without time zone"`
SourceCreatedAt time.Time
SourceUpdatedAt time.Time
Offline bool
Trashed bool
Width *int
Height *int
Duration *int
Thumbhash *string
LivePhotoVideoID *string
SourceStackID *string
SourceStackPrimaryID *string
SourceStackCount *int
EXIF map[string]any `bun:"exif,type:jsonb"`
ContentVersion string
// VideoTitle is the Curator's optional presentation title. Nil means the
// filename without its extension is shown.
VideoTitle *string
}
MediaItem holds shared source facts, never media bytes.
type Moment ¶
type Moment struct {
bun.BaseModel `bun:"table:moments,alias:moment"`
ID UUID `bun:"id,pk,type:uuid"`
AlbumID UUID `bun:"type:uuid"`
CaptureDate string
Title *string
SortOrder int64
CoverEntryID UUID `bun:"type:uuid"`
// CoverPosition is the Moment's place in the Album's Cover Order; nil
// leaves it to capture order.
CoverPosition *int64
}
type MomentAccessDecision ¶
type Person ¶
type Person struct {
bun.BaseModel `bun:"table:persons"`
ID UUID `bun:"id,pk,type:uuid"`
DisplayName string
IsCurator bool
OnboardingCompletedAt *time.Time
DeactivatedAt *time.Time
UpdateIdentityID *UUID `bun:"update_identity_id,type:uuid"`
UpdateEmail string `bun:",scanonly"`
EmailUpdates bool
AvatarFaceID *string
AvatarVersion string `bun:",scanonly"`
CreatedAt time.Time
}
type Preauthorization ¶
type Preauthorization struct {
}
type UUID ¶
UUID adds database support to the standard library UUID type.
func (UUID) MarshalText ¶
func (*UUID) UnmarshalText ¶
type UnsubscribeToken ¶
type UnsubscribeToken struct {
bun.BaseModel `bun:"table:unsubscribe_tokens,alias:unsubscribe"`
PersonID UUID `bun:"person_id,pk,type:uuid"`
Token string
CreatedAt time.Time
}
UnsubscribeToken is a Person's private link secret for stopping update email without signing in. The token itself is stored so every later email can carry the same link.
type UpdateNotification ¶
type UpdateNotification struct {
bun.BaseModel `bun:"table:update_notifications,alias:notification"`
ID UUID `bun:"id,pk,type:uuid"`
PersonID UUID `bun:"person_id,type:uuid"`
Version int
Payload json.RawMessage `bun:"payload,type:jsonb"`
CreatedAt time.Time
ReadAt *time.Time
DeliveryID *UUID `bun:"delivery_id,type:uuid"`
}
UpdateNotification is one approved, immutable in-app summary. Version names the payload shape so later readers can still render old rows; ReadAt is the only column that changes after creation. DeliveryID names the optional email for the same summary and is nil when the Person gets it in app only.