| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Tendermint.SDK.BaseApp.Store.RawStore
Synopsis
- type StoreEffs = [Tagged 'Consensus ReadStore, Tagged 'QueryAndMempool ReadStore, Tagged 'Consensus WriteStore, Transaction, CommitBlock]
- data Scope
- data ReadStore m a where
- StoreGet :: StoreKey -> ReadStore m (Maybe ByteString)
- StoreProve :: StoreKey -> ReadStore m (Maybe ByteString)
- storeGet :: forall r. MemberWithError ReadStore r => StoreKey -> Sem r (Maybe ByteString)
- get :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Members [ReadStore, Error AppError] r => Store ns -> k -> Sem r (Maybe (Value k ns))
- prove :: forall k ns r. IsKey k ns => Member ReadStore r => Store ns -> k -> Sem r (Maybe ByteString)
- data WriteStore m a where
- StorePut :: StoreKey -> ByteString -> WriteStore m ()
- StoreDelete :: StoreKey -> WriteStore m ()
- put :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Member WriteStore r => Store ns -> k -> Value k ns -> Sem r ()
- storePut :: forall r. MemberWithError WriteStore r => StoreKey -> ByteString -> Sem r ()
- delete :: forall k ns r. IsKey k ns => Member WriteStore r => Store ns -> k -> Sem r ()
- storeDelete :: forall r. MemberWithError WriteStore r => StoreKey -> Sem r ()
- data CommitBlock m a where
- commitBlock :: forall r. MemberWithError CommitBlock r => Sem r Base64String
- data Transaction m a where
- BeginTransaction :: Transaction m ()
- Rollback :: Transaction m ()
- Commit :: Transaction m CommitResponse
- beginTransaction :: forall r. MemberWithError Transaction r => Sem r ()
- withSandbox :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r a
- withTransaction :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r (a, CommitResponse)
- commit :: forall r. MemberWithError Transaction r => Sem r CommitResponse
- class RawKey k where
- rawKey :: Iso' k ByteString
- class RawKey k => IsKey k ns where
- data StoreKey = StoreKey {
- skPathFromRoot :: [ByteString]
- skKey :: ByteString
- newtype KeyRoot ns = KeyRoot ByteString
- makeKeyBytes :: StoreKey -> ByteString
- data CommitResponse = CommitResponse {}
- data Store ns
- nestStore :: Store parentns -> Store childns -> Store childns
- makeStore :: KeyRoot ns -> Store ns
- makeStoreKey :: forall k ns. IsKey k ns => Store ns -> k -> StoreKey
- data Version
Effects
type StoreEffs = [Tagged 'Consensus ReadStore, Tagged 'QueryAndMempool ReadStore, Tagged 'Consensus WriteStore, Transaction, CommitBlock] Source #
data ReadStore m a where Source #
Read and Write Effects
Constructors
| StoreGet :: StoreKey -> ReadStore m (Maybe ByteString) | |
| StoreProve :: StoreKey -> ReadStore m (Maybe ByteString) |
get :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Members [ReadStore, Error AppError] r => Store ns -> k -> Sem r (Maybe (Value k ns)) Source #
prove :: forall k ns r. IsKey k ns => Member ReadStore r => Store ns -> k -> Sem r (Maybe ByteString) Source #
data WriteStore m a where Source #
Constructors
| StorePut :: StoreKey -> ByteString -> WriteStore m () | |
| StoreDelete :: StoreKey -> WriteStore m () |
Instances
| type DefiningModule (WriteStore :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore | |
put :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Member WriteStore r => Store ns -> k -> Value k ns -> Sem r () Source #
storePut :: forall r. MemberWithError WriteStore r => StoreKey -> ByteString -> Sem r () Source #
storeDelete :: forall r. MemberWithError WriteStore r => StoreKey -> Sem r () Source #
data CommitBlock m a where Source #
Consensus Effects
Constructors
| CommitBlock :: CommitBlock m Base64String |
Instances
| type DefiningModule (CommitBlock :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore | |
commitBlock :: forall r. MemberWithError CommitBlock r => Sem r Base64String Source #
data Transaction m a where Source #
Constructors
| BeginTransaction :: Transaction m () | |
| Rollback :: Transaction m () | |
| Commit :: Transaction m CommitResponse |
Instances
| type DefiningModule (Transaction :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore | |
beginTransaction :: forall r. MemberWithError Transaction r => Sem r () Source #
withSandbox :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r a Source #
withTransaction :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r (a, CommitResponse) Source #
commit :: forall r. MemberWithError Transaction r => Sem r CommitResponse Source #
Types
Keys
Methods
rawKey :: Iso' k ByteString Source #
Instances
| RawKey Word64 Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods rawKey :: Iso' Word64 ByteString Source # | |
| RawKey () Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods rawKey :: Iso' () ByteString Source # | |
| RawKey Text Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods rawKey :: Iso' Text ByteString Source # | |
| RawKey Address Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods rawKey :: Iso' Address ByteString Source # | |
| RawKey PubKey_ Source # | |
Defined in Tendermint.SDK.Modules.Validators.Types Methods rawKey :: Iso' PubKey_ ByteString Source # | |
class RawKey k => IsKey k ns where Source #
Minimal complete definition
Nothing
Methods
Constructors
| StoreKey | |
Fields
| |
makeKeyBytes :: StoreKey -> ByteString Source #
data CommitResponse Source #
Constructors
| CommitResponse | |
Fields | |
Instances
| Eq CommitResponse Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods (==) :: CommitResponse -> CommitResponse -> Bool # (/=) :: CommitResponse -> CommitResponse -> Bool # | |
| Show CommitResponse Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore Methods showsPrec :: Int -> CommitResponse -> ShowS # show :: CommitResponse -> String # showList :: [CommitResponse] -> ShowS # | |