e2eutils

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminSetup

func AdminSetup(email, password, name string) error

func CheckResults

func CheckResults(t *testing.T, expectedResults map[fileevent.Code]int64, forcedJSON bool, processor *fileprocessor.FileProcessor) bool

func CreateApiKey

func CreateApiKey(token Token, name string, permissions []string) (string, error)

func CreateUser

func CreateUser(adminToken Token, email string, password string, name string) error

func GetAllAssets

func GetAllAssets(email, password string) (map[string]*Asset, error)

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

func SetUserOnboarding(token Token, onboarding bool) error

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

type Token

type Token string

func UserLogin

func UserLogin(email, password string) (Token, error)

Directories

Path Synopsis
cmd
createUser command

Jump to

Keyboard shortcuts

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