Documentation
¶
Index ¶
- func AdminSetup(email, password, name string) error
- func CheckResults(t *testing.T, expectedTesults 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 ExecWithTimeout(ctx context.Context, timeout time.Duration, command string, args ...string) error
- func GetAndTransformDockerFile(ctx context.Context, url string) ([]byte, error)
- func GetFile(ctx context.Context, url string) ([]byte, error)
- func Local(p string) func(ctx context.Context, ictlr *ImmichController) error
- func Remote(sshhost, immichUrl, dcPath string) func(ctx context.Context, ictlr *ImmichController) error
- func RunWithTimeout(timeout time.Duration, f func(ctx context.Context) error) error
- func SetUserOnboarding(token Token, onboarding bool) error
- type ErrorResponse
- type ImmichController
- func (ictlr *ImmichController) DeployImmich(ctx context.Context) error
- func (ictlr *ImmichController) GetDockerComposeFile() string
- func (ictlr *ImmichController) ImmichGet(ctx context.Context) error
- func (ictlr *ImmichController) IsRemote() bool
- func (ictlr *ImmichController) PauseImmichServer(ctx context.Context) error
- func (ictlr *ImmichController) PingAPI(ctx context.Context) error
- func (ictlr *ImmichController) ResumeImmichServer(ctx context.Context) error
- func (ictlr *ImmichController) RunImmich(ctx context.Context) error
- func (ictlr *ImmichController) StopImmich(ctx context.Context) error
- func (ictlr *ImmichController) WaitAPI(ctx context.Context, timeout time.Duration) error
- type Keys
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminSetup ¶
func CheckResults ¶
func CreateApiKey ¶
func CreateUser ¶
func ExecWithTimeout ¶
func ExecWithTimeout(ctx context.Context, timeout time.Duration, command string, args ...string) error
ExecWithTimeout executes a command with a timeout and context support
func Local ¶
func Local(p string) func(ctx context.Context, ictlr *ImmichController) error
Local configures the control on the host machine
func Remote ¶
func Remote(sshhost, immichUrl, dcPath string) func(ctx context.Context, ictlr *ImmichController) error
Remote configures the controller to use SSH for remote operations
func RunWithTimeout ¶
RunWithTimeout runs a function with a timeout context
func SetUserOnboarding ¶
Types ¶
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 ImmichController ¶
type ImmichController struct {
// contains filtered or unexported fields
}
func NewImmichController ¶
func NewImmichController(p string) (*ImmichController, error)
NewImmichController creates a new controller with the specified path
func OpenImmichController ¶
func OpenImmichController(ctx context.Context, initializer func(ctx context.Context, ictlr *ImmichController) error) (*ImmichController, error)
OpenImmichController opens a new ImmichController instance with the specified docker-compose file path
func (*ImmichController) DeployImmich ¶
func (ictlr *ImmichController) DeployImmich(ctx context.Context) error
DeployImmich downloads Immich configuration files from the application web page and prepares the Docker environment
func (*ImmichController) GetDockerComposeFile ¶
func (ictlr *ImmichController) GetDockerComposeFile() string
func (*ImmichController) ImmichGet ¶
func (ictlr *ImmichController) ImmichGet(ctx context.Context) error
ImmichGet performs a complete Immich setup: downloads configuration files, starts services, and waits for API readiness
func (*ImmichController) IsRemote ¶
func (ictlr *ImmichController) IsRemote() bool
IsRemote returns true if the controller is configured for remote SSH access
func (*ImmichController) PauseImmichServer ¶
func (ictlr *ImmichController) PauseImmichServer(ctx context.Context) error
PauseImmichServer stops the Immich server container specifically
func (*ImmichController) PingAPI ¶
func (ictlr *ImmichController) PingAPI(ctx context.Context) error
PingAPI performs a quick health check on the Immich API server
func (*ImmichController) ResumeImmichServer ¶
func (ictlr *ImmichController) ResumeImmichServer(ctx context.Context) error
ResumeImmichServer starts the Immich server container in detached mode
func (*ImmichController) RunImmich ¶
func (ictlr *ImmichController) RunImmich(ctx context.Context) error
RunImmich starts the Immich services using docker compose
func (*ImmichController) StopImmich ¶
func (ictlr *ImmichController) StopImmich(ctx context.Context) error
StopImmich stops the Immich services using docker compose