Documentation
¶
Index ¶
- func AdminSetup(email, password, name string) error
- func CheckResults(t *testing.T, expectedResults map[fileevent.Code]int64, forcedJSON bool, ...) bool
- func CreateApiKey(token Token, name string, permissions []string) (string, error)
- func CreateUser(adminToken Token, email string, password string, name string) error
- func GetAllAssets(email, password string) (map[string]*Asset, error)
- func SetUserOnboarding(token Token, onboarding bool) error
- type Asset
- type ErrorResponse
- type SearchMetadataRequest
- type SearchMetadataResponse
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminSetup ¶
func CheckResults ¶
func CheckResults(t *testing.T, expectedResults map[fileevent.Code]int64, forcedJSON bool, processor *fileprocessor.FileProcessor) bool
func CreateApiKey ¶
func CreateUser ¶
func GetAllAssets ¶
GetAllAssets retrieves all assets for a user using the search/metadata endpoint It ignores albums, exifInfo, owner, and people fields Returns a map of assets indexed by OriginalFileName
func SetUserOnboarding ¶
Types ¶
type Asset ¶
type Asset struct {
ID string `json:"id"`
DeviceAssetID string `json:"deviceAssetId"`
DeviceID string `json:"deviceId"`
Type string `json:"type"`
OriginalPath string `json:"originalPath"`
OriginalFileName string `json:"originalFileName"`
Resized bool `json:"resized"`
Thumbhash string `json:"thumbhash"`
FileCreatedAt string `json:"fileCreatedAt"`
FileModifiedAt string `json:"fileModifiedAt"`
LocalDateTime string `json:"localDateTime"`
UpdatedAt string `json:"updatedAt"`
IsFavorite bool `json:"isFavorite"`
IsArchived bool `json:"isArchived"`
IsTrashed bool `json:"isTrashed"`
Duration string `json:"duration"`
Checksum string `json:"checksum"`
LivePhotoVideoID string `json:"livePhotoVideoId"`
Tags []string `json:"tags"`
Rating int `json:"rating"`
Visibility string `json:"visibility"`
}
Asset represents a simplified Immich asset returned from search
type ErrorResponse ¶
type ErrorResponse struct {
Message any `json:"message"`
Error string `json:"error"`
StatusCode int `json:"statusCode"`
CorrelationID string `json:"correlationId"`
}
func (ErrorResponse) GetMessage ¶
func (e ErrorResponse) GetMessage() string
GetMessage concatenates all messages into a single string, handling both string and []string formats
type SearchMetadataRequest ¶
type SearchMetadataRequest struct {
Page int `json:"page"`
Size int `json:"size"`
WithExif bool `json:"withExif"`
WithStacked bool `json:"withStacked"`
}
SearchMetadataRequest represents the request body for /search/metadata
type SearchMetadataResponse ¶
type SearchMetadataResponse struct {
Assets struct {
Count int `json:"count"`
Items []*Asset `json:"items"`
NextPage int `json:"nextPage"`
} `json:"assets"`
}
SearchMetadataResponse represents the response from /search/metadata
Click to show internal directories.
Click to hide internal directories.