hackage-security-0.5.2.2: Hackage security library

Safe Haskell | None
Language | Haskell2010

Hackage.Security.Key.Env

Contents

- Convenience constructors
- The usual accessors

Synopsis

- data KeyEnv
- keyEnvMap :: KeyEnv -> Map KeyId (Some PublicKey)
- fromPublicKeys :: [Some PublicKey] -> KeyEnv
- fromKeys :: [Some Key] -> KeyEnv
- empty :: KeyEnv
- null :: KeyEnv -> Bool
- insert :: Some PublicKey -> KeyEnv -> KeyEnv
- lookup :: KeyId -> KeyEnv -> Maybe (Some PublicKey)
- union :: KeyEnv -> KeyEnv -> KeyEnv

# Documentation

data KeyEnv #

A key environment is a mapping from key IDs to the corresponding keys.

It should satisfy the invariant that these key IDs actually match the keys; see `checkKeyEnvInvariant`.

Instances

Show KeyEnv # |
Methods showsPrec :: Int -> KeyEnv -> ShowS # show :: KeyEnv -> String # showList :: [KeyEnv] -> ShowS #
ReportSchemaErrors m => FromJSON m KeyEnv # |
Methods fromJSON :: JSValue -> m KeyEnv #
Monad m => ToJSON m KeyEnv # |
Methods toJSON :: KeyEnv -> m JSValue #

keyEnvMap :: KeyEnv -> Map KeyId (Some PublicKey) #

# Convenience constructors

fromPublicKeys :: [Some PublicKey] -> KeyEnv #

fromKeys :: [Some Key] -> KeyEnv #

# The usual accessors

empty :: KeyEnv #

null :: KeyEnv -> Bool #

insert :: Some PublicKey -> KeyEnv -> KeyEnv #

lookup :: KeyId -> KeyEnv -> Maybe (Some PublicKey) #

union :: KeyEnv -> KeyEnv -> KeyEnv #