avers-0.0.17.1: Server-side implementation of the Avers storage model
Safe HaskellNone
LanguageHaskell2010

Avers.Types

Synopsis

Documentation

class Pk a where Source #

Pk - Types which can be converted to a database primary key.

Methods

toPk :: a -> Text Source #

Instances

Instances details
Pk Text Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Text -> Text Source #

Pk ObjectId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: ObjectId -> Text Source #

Pk RevId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: RevId -> Text Source #

Pk ObjId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: ObjId -> Text Source #

Pk Object Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Object -> Text Source #

Pk Patch Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Patch -> Text Source #

Pk Snapshot Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Snapshot -> Text Source #

Pk Secret Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Secret -> Text Source #

Pk SecretId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: SecretId -> Text Source #

Pk Blob Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Blob -> Text Source #

Pk BlobId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: BlobId -> Text Source #

Pk Session Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Session -> Text Source #

Pk SessionId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: SessionId -> Text Source #

Pk (Record a) Source # 
Instance details

Defined in Avers.Views

Methods

toPk :: Record a -> Text Source #

newtype Path Source #

Path

Constructors

Path 

Fields

Instances

Instances details
Eq Path Source # 
Instance details

Defined in Avers.Types

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Ord Path Source # 
Instance details

Defined in Avers.Types

Methods

compare :: Path -> Path -> Ordering #

(<) :: Path -> Path -> Bool #

(<=) :: Path -> Path -> Bool #

(>) :: Path -> Path -> Bool #

(>=) :: Path -> Path -> Bool #

max :: Path -> Path -> Path #

min :: Path -> Path -> Path #

Show Path Source # 
Instance details

Defined in Avers.Types

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

IsString Path Source # 
Instance details

Defined in Avers.Types

Methods

fromString :: String -> Path #

Generic Path Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Path :: Type -> Type #

Methods

from :: Path -> Rep Path x #

to :: Rep Path x -> Path #

ToJSON Path Source # 
Instance details

Defined in Avers.Types

FromJSON Path Source # 
Instance details

Defined in Avers.Types

ToDatum Path Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Path -> Datum #

FromDatum Path Source # 
Instance details

Defined in Avers.Types

type Rep Path Source # 
Instance details

Defined in Avers.Types

type Rep Path = D1 ('MetaData "Path" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "Path" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

rootPath :: Path Source #

This path refers to the root of an object. It is only used in Set operations.

newtype ObjId Source #

ObjId

Constructors

ObjId 

Fields

Instances

Instances details
Eq ObjId Source # 
Instance details

Defined in Avers.Types

Methods

(==) :: ObjId -> ObjId -> Bool #

(/=) :: ObjId -> ObjId -> Bool #

Ord ObjId Source # 
Instance details

Defined in Avers.Types

Methods

compare :: ObjId -> ObjId -> Ordering #

(<) :: ObjId -> ObjId -> Bool #

(<=) :: ObjId -> ObjId -> Bool #

(>) :: ObjId -> ObjId -> Bool #

(>=) :: ObjId -> ObjId -> Bool #

max :: ObjId -> ObjId -> ObjId #

min :: ObjId -> ObjId -> ObjId #

Show ObjId Source # 
Instance details

Defined in Avers.Types

Methods

showsPrec :: Int -> ObjId -> ShowS #

show :: ObjId -> String #

showList :: [ObjId] -> ShowS #

Generic ObjId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep ObjId :: Type -> Type #

Methods

from :: ObjId -> Rep ObjId x #

to :: Rep ObjId x -> ObjId #

ToJSON ObjId Source # 
Instance details

Defined in Avers.Types

FromJSON ObjId Source # 
Instance details

Defined in Avers.Types

ToDatum ObjId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: ObjId -> Datum #

FromDatum ObjId Source # 
Instance details

Defined in Avers.Types

Pk ObjId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: ObjId -> Text Source #

type Rep ObjId Source # 
Instance details

Defined in Avers.Types

type Rep ObjId = D1 ('MetaData "ObjId" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "ObjId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unObjId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

rootObjId :: ObjId Source #

The root object id is used for object created internally or when there is no applicable creator.

newtype RevId Source #

RevId

Constructors

RevId 

Fields

Instances

Instances details
Enum RevId Source # 
Instance details

Defined in Avers.Types

Eq RevId Source # 
Instance details

Defined in Avers.Types

Methods

(==) :: RevId -> RevId -> Bool #

(/=) :: RevId -> RevId -> Bool #

Ord RevId Source # 
Instance details

Defined in Avers.Types

Methods

compare :: RevId -> RevId -> Ordering #

(<) :: RevId -> RevId -> Bool #

(<=) :: RevId -> RevId -> Bool #

(>) :: RevId -> RevId -> Bool #

(>=) :: RevId -> RevId -> Bool #

max :: RevId -> RevId -> RevId #

min :: RevId -> RevId -> RevId #

Show RevId Source # 
Instance details

Defined in Avers.Types

Methods

showsPrec :: Int -> RevId -> ShowS #

show :: RevId -> String #

showList :: [RevId] -> ShowS #

Generic RevId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep RevId :: Type -> Type #

Methods

from :: RevId -> Rep RevId x #

to :: Rep RevId x -> RevId #

ToJSON RevId Source # 
Instance details

Defined in Avers.Types

FromJSON RevId Source # 
Instance details

Defined in Avers.Types

ToDatum RevId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: RevId -> Datum #

FromDatum RevId Source # 
Instance details

Defined in Avers.Types

Pk RevId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: RevId -> Text Source #

type Rep RevId Source # 
Instance details

Defined in Avers.Types

type Rep RevId = D1 ('MetaData "RevId" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "RevId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRevId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

zeroRevId :: RevId Source #

The RevId which is used for the initial snapshot.

data ObjectId Source #

ObjectId

Constructors

BaseObjectId !ObjId

The base object whose snapshots contain the actual content.

ReleaseObjectId !ObjId !RevId

An object describing a particualar release of the base object.

AuthorizationObjectId !ObjId

Object which contains authorization rules.

Instances

Instances details
Eq ObjectId Source # 
Instance details

Defined in Avers.Types

Ord ObjectId Source # 
Instance details

Defined in Avers.Types

Show ObjectId Source # 
Instance details

Defined in Avers.Types

Generic ObjectId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep ObjectId :: Type -> Type #

Methods

from :: ObjectId -> Rep ObjectId x #

to :: Rep ObjectId x -> ObjectId #

ToJSON ObjectId Source # 
Instance details

Defined in Avers.Types

FromJSON ObjectId Source # 
Instance details

Defined in Avers.Types

ToDatum ObjectId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: ObjectId -> Datum #

FromDatum ObjectId Source # 
Instance details

Defined in Avers.Types

Pk ObjectId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: ObjectId -> Text Source #

type Rep ObjectId Source # 
Instance details

Defined in Avers.Types

data Operation Source #

The operations that can be applied to JSON values.

Constructors

Set

Set is applied to Objects. It is used for adding, updating and deleting properties from the object.

Fields

Splice

Splice is used to manipulate Arrays. It can remove and insert multiple elements in a single operation.

Fields

Instances

Instances details
Eq Operation Source # 
Instance details

Defined in Avers.Types

Show Operation Source # 
Instance details

Defined in Avers.Types

Generic Operation Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Operation :: Type -> Type #

ToJSON Operation Source # 
Instance details

Defined in Avers.Types

FromJSON Operation Source # 
Instance details

Defined in Avers.Types

ToDatum Operation Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Operation -> Datum #

FromDatum Operation Source # 
Instance details

Defined in Avers.Types

type Rep Operation Source # 
Instance details

Defined in Avers.Types

data PatchError Source #

Constructors

UnknownPatchError !Text 

Instances

Instances details
Show PatchError Source # 
Instance details

Defined in Avers.Types

Generic PatchError Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep PatchError :: Type -> Type #

type Rep PatchError Source # 
Instance details

Defined in Avers.Types

type Rep PatchError = D1 ('MetaData "PatchError" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "UnknownPatchError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data Object Source #

Instances

Instances details
Show Object Source # 
Instance details

Defined in Avers.Types

Generic Object Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Object :: Type -> Type #

Methods

from :: Object -> Rep Object x #

to :: Rep Object x -> Object #

ToJSON Object Source # 
Instance details

Defined in Avers.Types

FromJSON Object Source # 
Instance details

Defined in Avers.Types

ToDatum Object Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Object -> Datum #

FromDatum Object Source # 
Instance details

Defined in Avers.Types

Pk Object Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Object -> Text Source #

type Rep Object Source # 
Instance details

Defined in Avers.Types

type Rep Object = D1 ('MetaData "Object" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Object" 'PrefixI 'True) ((S1 ('MetaSel ('Just "objectId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjId) :*: S1 ('MetaSel ('Just "objectType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "objectCreatedAt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "objectCreatedBy") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjId) :*: S1 ('MetaSel ('Just "objectDeleted") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Bool))))))

data Patch Source #

Patch

Instances

Instances details
Show Patch Source # 
Instance details

Defined in Avers.Types

Methods

showsPrec :: Int -> Patch -> ShowS #

show :: Patch -> String #

showList :: [Patch] -> ShowS #

Generic Patch Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Patch :: Type -> Type #

Methods

from :: Patch -> Rep Patch x #

to :: Rep Patch x -> Patch #

ToJSON Patch Source # 
Instance details

Defined in Avers.Types

FromJSON Patch Source # 
Instance details

Defined in Avers.Types

ToDatum Patch Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Patch -> Datum #

FromDatum Patch Source # 
Instance details

Defined in Avers.Types

Pk Patch Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Patch -> Text Source #

type Rep Patch Source # 
Instance details

Defined in Avers.Types

type Rep Patch = D1 ('MetaData "Patch" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Patch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "patchObjectId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjectId) :*: S1 ('MetaSel ('Just "patchRevisionId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RevId)) :*: (S1 ('MetaSel ('Just "patchAuthorId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjId) :*: (S1 ('MetaSel ('Just "patchCreatedAt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "patchOperation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Operation)))))

data Snapshot Source #

Snapshot

Instances

Instances details
Show Snapshot Source # 
Instance details

Defined in Avers.Types

Generic Snapshot Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Snapshot :: Type -> Type #

Methods

from :: Snapshot -> Rep Snapshot x #

to :: Rep Snapshot x -> Snapshot #

ToJSON Snapshot Source # 
Instance details

Defined in Avers.Types

FromJSON Snapshot Source # 
Instance details

Defined in Avers.Types

ToDatum Snapshot Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Snapshot -> Datum #

FromDatum Snapshot Source # 
Instance details

Defined in Avers.Types

Pk Snapshot Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Snapshot -> Text Source #

type Rep Snapshot Source # 
Instance details

Defined in Avers.Types

type Rep Snapshot = D1 ('MetaData "Snapshot" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Snapshot" 'PrefixI 'True) (S1 ('MetaSel ('Just "snapshotObjectId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjectId) :*: (S1 ('MetaSel ('Just "snapshotRevisionId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RevId) :*: S1 ('MetaSel ('Just "snapshotContent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value))))

initialSnapshot :: ObjectId -> Snapshot Source #

The initial snapshot on top of which all future patches are applied.

data Release Source #

Release

Constructors

Release 

Instances

Instances details
ToJSON Release Source # 
Instance details

Defined in Avers.Types

FromJSON Release Source # 
Instance details

Defined in Avers.Types

(deriveJSONOptions "release") ''Release)

newtype SecretId Source #

SecretId

Constructors

SecretId 

Fields

Instances

Instances details
Show SecretId Source # 
Instance details

Defined in Avers.Types

Generic SecretId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep SecretId :: Type -> Type #

Methods

from :: SecretId -> Rep SecretId x #

to :: Rep SecretId x -> SecretId #

ToJSON SecretId Source # 
Instance details

Defined in Avers.Types

FromJSON SecretId Source # 
Instance details

Defined in Avers.Types

ToDatum SecretId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: SecretId -> Datum #

FromDatum SecretId Source # 
Instance details

Defined in Avers.Types

Pk SecretId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: SecretId -> Text Source #

type Rep SecretId Source # 
Instance details

Defined in Avers.Types

type Rep SecretId = D1 ('MetaData "SecretId" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "SecretId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSecretId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Secret Source #

Secret

A Secret is a password (encrypted with scrypt) that is attached to a SecretId (for example the ObjId of an account).

It is up to you to ensure that SecretIds are unique. If you use ObjIds then they by definition are.

Constructors

Secret 

Instances

Instances details
Generic Secret Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Secret :: Type -> Type #

Methods

from :: Secret -> Rep Secret x #

to :: Rep Secret x -> Secret #

ToJSON Secret Source # 
Instance details

Defined in Avers.Types

FromJSON Secret Source # 
Instance details

Defined in Avers.Types

ToDatum Secret Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Secret -> Datum #

FromDatum Secret Source # 
Instance details

Defined in Avers.Types

Pk Secret Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Secret -> Text Source #

type Rep Secret Source # 
Instance details

Defined in Avers.Types

type Rep Secret = D1 ('MetaData "Secret" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Secret" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecretId) :*: S1 ('MetaSel ('Just "secretValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

newtype BlobId Source #

BlobId

Constructors

BlobId 

Fields

Instances

Instances details
Show BlobId Source # 
Instance details

Defined in Avers.Types

Generic BlobId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep BlobId :: Type -> Type #

Methods

from :: BlobId -> Rep BlobId x #

to :: Rep BlobId x -> BlobId #

ToJSON BlobId Source # 
Instance details

Defined in Avers.Types

FromJSON BlobId Source # 
Instance details

Defined in Avers.Types

ToDatum BlobId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: BlobId -> Datum #

FromDatum BlobId Source # 
Instance details

Defined in Avers.Types

Pk BlobId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: BlobId -> Text Source #

type Rep BlobId Source # 
Instance details

Defined in Avers.Types

type Rep BlobId = D1 ('MetaData "BlobId" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "BlobId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Blob Source #

Blob

Constructors

Blob 

Instances

Instances details
Show Blob Source # 
Instance details

Defined in Avers.Types

Methods

showsPrec :: Int -> Blob -> ShowS #

show :: Blob -> String #

showList :: [Blob] -> ShowS #

Generic Blob Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Blob :: Type -> Type #

Methods

from :: Blob -> Rep Blob x #

to :: Rep Blob x -> Blob #

ToJSON Blob Source # 
Instance details

Defined in Avers.Types

FromJSON Blob Source # 
Instance details

Defined in Avers.Types

ToDatum Blob Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Blob -> Datum #

FromDatum Blob Source # 
Instance details

Defined in Avers.Types

Pk Blob Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Blob -> Text Source #

type Rep Blob Source # 
Instance details

Defined in Avers.Types

type Rep Blob = D1 ('MetaData "Blob" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Blob" 'PrefixI 'True) (S1 ('MetaSel ('Just "blobId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlobId) :*: (S1 ('MetaSel ('Just "blobSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "blobContentType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

newtype SessionId Source #

SessionId

Constructors

SessionId 

Fields

Instances

Instances details
Generic SessionId Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep SessionId :: Type -> Type #

ToJSON SessionId Source # 
Instance details

Defined in Avers.Types

FromJSON SessionId Source # 
Instance details

Defined in Avers.Types

ToDatum SessionId Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: SessionId -> Datum #

FromDatum SessionId Source # 
Instance details

Defined in Avers.Types

Pk SessionId Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: SessionId -> Text Source #

type Rep SessionId Source # 
Instance details

Defined in Avers.Types

type Rep SessionId = D1 ('MetaData "SessionId" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'True) (C1 ('MetaCons "SessionId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSessionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Session Source #

The session record that is stored in the database.

A session is a unique identifier attached to a particular object. It contains the creation date and when it was last accessed. If you need to store additional data for a session, we recommend to use cookies.

Instances

Instances details
Generic Session Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Session :: Type -> Type #

Methods

from :: Session -> Rep Session x #

to :: Rep Session x -> Session #

ToJSON Session Source # 
Instance details

Defined in Avers.Types

FromJSON Session Source # 
Instance details

Defined in Avers.Types

ToDatum Session Source # 
Instance details

Defined in Avers.Types

Methods

toDatum :: Session -> Datum #

FromDatum Session Source # 
Instance details

Defined in Avers.Types

Pk Session Source # 
Instance details

Defined in Avers.Types

Methods

toPk :: Session -> Text Source #

type Rep Session Source # 
Instance details

Defined in Avers.Types

type Rep Session = D1 ('MetaData "Session" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "Session" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sessionId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SessionId) :*: S1 ('MetaSel ('Just "sessionObjId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjId)) :*: (S1 ('MetaSel ('Just "sessionCreatedAt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "sessionLastAccessedAt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime))))

data AversError Source #

Instances

Instances details
Show AversError Source # 
Instance details

Defined in Avers.Types

Generic AversError Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep AversError :: Type -> Type #

MonadError AversError Avers Source # 
Instance details

Defined in Avers.Types

Methods

throwError :: AversError -> Avers a #

catchError :: Avers a -> (AversError -> Avers a) -> Avers a #

type Rep AversError Source # 
Instance details

Defined in Avers.Types

type Rep AversError = D1 ('MetaData "AversError" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (((C1 ('MetaCons "InternalError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AversError)) :+: C1 ('MetaCons "DatabaseError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "PatchError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PatchError)) :+: C1 ('MetaCons "ParseError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :+: ((C1 ('MetaCons "UnknownObjectType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ObjectNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ObjId))) :+: (C1 ('MetaCons "DocumentNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "AversError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "NotAuthorized" 'PrefixI 'False) (U1 :: Type -> Type)))))

data ObjectType a Source #

An ObjectType describes a particular type of object that is managed by Avers.

Constructors

ObjectType 

Fields

data Config Source #

Configuration of the Avers monad.

Constructors

Config 

Fields

data Change Source #

A change in the system, for example a new object, patch, release, blob etc.

Constructors

CPatch !Patch

A new patch was created.

Instances

Instances details
Show Change Source # 
Instance details

Defined in Avers.Types

Generic Change Source # 
Instance details

Defined in Avers.Types

Associated Types

type Rep Change :: Type -> Type #

Methods

from :: Change -> Rep Change x #

to :: Rep Change x -> Change #

ToJSON Change Source # 
Instance details

Defined in Avers.Types

type Rep Change Source # 
Instance details

Defined in Avers.Types

type Rep Change = D1 ('MetaData "Change" "Avers.Types" "avers-0.0.17.1-9kdjlsFObHd4VvDcbnYnDM" 'False) (C1 ('MetaCons "CPatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Patch)))

data Handle Source #

Constructors

Handle 

Fields

Instances

Instances details
MonadState Handle Avers Source # 
Instance details

Defined in Avers.Types

Methods

get :: Avers Handle #

put :: Handle -> Avers () #

state :: (Handle -> (a, Handle)) -> Avers a #

newtype Avers a Source #

Constructors

Avers 

Instances

Instances details
Monad Avers Source # 
Instance details

Defined in Avers.Types

Methods

(>>=) :: Avers a -> (a -> Avers b) -> Avers b #

(>>) :: Avers a -> Avers b -> Avers b #

return :: a -> Avers a #

Functor Avers Source # 
Instance details

Defined in Avers.Types

Methods

fmap :: (a -> b) -> Avers a -> Avers b #

(<$) :: a -> Avers b -> Avers a #

Applicative Avers Source # 
Instance details

Defined in Avers.Types

Methods

pure :: a -> Avers a #

(<*>) :: Avers (a -> b) -> Avers a -> Avers b #

liftA2 :: (a -> b -> c) -> Avers a -> Avers b -> Avers c #

(*>) :: Avers a -> Avers b -> Avers b #

(<*) :: Avers a -> Avers b -> Avers a #

MonadIO Avers Source # 
Instance details

Defined in Avers.Types

Methods

liftIO :: IO a -> Avers a #

MonadAvers Avers Source # 
Instance details

Defined in Avers.Types

Methods

liftAvers :: Avers a -> Avers a Source #

MonadState Handle Avers Source # 
Instance details

Defined in Avers.Types

Methods

get :: Avers Handle #

put :: Handle -> Avers () #

state :: (Handle -> (a, Handle)) -> Avers a #

MonadError AversError Avers Source # 
Instance details

Defined in Avers.Types

Methods

throwError :: AversError -> Avers a #

catchError :: Avers a -> (AversError -> Avers a) -> Avers a #

class Monad m => MonadAvers m where Source #

Methods

liftAvers :: Avers a -> m a Source #

Instances

Instances details
MonadAvers Avers Source # 
Instance details

Defined in Avers.Types

Methods

liftAvers :: Avers a -> Avers a Source #

MonadAvers m => MonadAvers (StateT s m) Source # 
Instance details

Defined in Avers.Types

Methods

liftAvers :: Avers a -> StateT s m a Source #

data View obj a Source #

Constructors

View 

Fields

data SomeView obj where Source #

Constructors

SomeView :: (ToDatum a, FromDatum a, FromJSON obj, ToJSON a) => View obj a -> SomeView obj