pfile-0.1.0.1: CLI program for profiles management.
Copyright(c) 2024 Illia Shkroba
LicenseBSD3
MaintainerIllia Shkroba <is@pjwstk.edu.pl>
Stabilityunstable
Portabilitynon-portable (Non-Unix systems are not supported)
Safe HaskellSafe-Inferred
LanguageHaskell2010

PFile.Profile.Internal.Lifetime

Description

Types and functions for managing profiles lifetime.

Synopsis

Documentation

create Source #

Arguments

:: forall m. (MonadReader Env m, MonadError CreateError m, MonadIO m) 
=> CreateOptions

Options that control create behaviour (currently only linkHandlingStrategy).

-> Name

Name of a profile to be created. The name will be used as a directory name for the profile in profilesHomeDirPath.

-> [Absolute]

List of Absolute paths of filesystem's objects to be pushed into a profile.

-> m Profile 

Create a new profile called Name with a list of Absolute filesystem's objects to be pushed inside of a profilesHomeDirPath directory. When an error is encountered during pushAll, create attempts to rollback. If the rollback fails, the profile is considered Dangling. Only Valid profiles are returned.

Since: 0.1.0.0

data CreateError Source #

Error thrown by create.

Since: 0.1.0.0

Constructors

ProfileAlreadyExistsError !Name

'PFile.Profile.Internal.Profile.Profile with Name was found in profilesHomeDirPath.

PushRollbackError

create attempted to rollback due to CreateRollbackCause. The rollback has failed with a list of PopErrors. Since the rollback has failed, the profile passed to create is considered Dangling.

Fields

PushCreateError !CreateRollbackCause

create attempted to rollback due to CreateRollbackCause. The rollback has succeeded. The profile passed to create was not created.

data CreateRollbackCause Source #

create rollback cause.

Since: 0.1.0.0

Constructors

PushError !PushError

Error was encountered during pushAll.

DumpError !DumpError

Error was encountered during dump.

newtype CreateOptions Source #

create options.

Since: 0.1.0.0

Constructors

CreateOptions 

Fields