pfile-0.1.0.1: CLI program for profiles management.
Copyright(c) 2024 Illia Shkroba
LicenseBSD3
MaintainerIllia Shkroba <[email protected]>
Stabilityunstable
Portabilitynon-portable (Non-Unix systems are not supported)
Safe HaskellSafe-Inferred
LanguageHaskell2010

PFile.Profile.Internal.Profile

Description

Core types and functions related to profiles.

Synopsis

Documentation

absoluteRoot :: MonadReader Env m => Name -> m Root Source #

Get directory path where entries of a Profile named Name are stored.

Since: 0.1.0.0

profileState :: MonadReader Env m => Name -> m Absolute Source #

Get file path where serialized Profile named Name is stored.

Since: 0.1.0.0

profileRoot :: MonadReader Env m => Name -> m Absolute Source #

Get directory path where absoluteRoot and profileState of a Profile named Name are located.

Since: 0.1.0.0

data Profile Source #

Profile holds a list of Entryies.

Since: 0.1.0.0

Constructors

Profile 

Fields

Instances

Instances details
FromJSON Profile Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

ToJSON Profile Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

Generic Profile Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

Associated Types

type Rep Profile :: Type -> Type #

Methods

from :: Profile -> Rep Profile x #

to :: Rep Profile x -> Profile #

type Rep Profile Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

type Rep Profile = D1 ('MetaData "Profile" "PFile.Profile.Internal.Profile" "pfile-0.1.0.1-2LtZGa2mKrg5ZSmQeq7wuJ" 'False) (C1 ('MetaCons "Profile" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 State) :*: S1 ('MetaSel ('Just "entries") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Entry]))))

newtype Name Source #

Name of a Profile.

Since: 0.1.0.0

Constructors

Name 

Fields

Instances

Instances details
FromJSON Name Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

ToJSON Name Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

data State Source #

Profiles state.

Since: 0.1.0.0

Constructors

Dangling

When an error is encountered during pushAll, create attempts to rollback. If the rollback fails, the profile is considered Dangling.

Valid

When create succeeds, the created profile has Valid state.

Instances

Instances details
FromJSON State Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

ToJSON State Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

data Entry Source #

Entry represents a filesystem's object (directory, directory link, file, file link) that is mounted (or pushed) inside of a Profile.

Since: 0.1.0.0

Constructors

Entry 

Fields

Instances

Instances details
FromJSON Entry Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

ToJSON Entry Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

Generic Entry Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

Associated Types

type Rep Entry :: Type -> Type #

Methods

from :: Entry -> Rep Entry x #

to :: Rep Entry x -> Entry #

type Rep Entry Source # 
Instance details

Defined in PFile.Profile.Internal.Profile

type Rep Entry = D1 ('MetaData "Entry" "PFile.Profile.Internal.Profile" "pfile-0.1.0.1-2LtZGa2mKrg5ZSmQeq7wuJ" 'False) (C1 ('MetaCons "Entry" 'PrefixI 'True) (S1 ('MetaSel ('Just "mountPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Mount) :*: S1 ('MetaSel ('Just "originPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Absolute)))