hackage-security-0.6.3.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 Source #

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

Instances details

Show KeyEnv Source # |
Instance details Defined in Hackage.Security.Key.Env Methods showsPrec :: Int -> KeyEnv -> ShowS Source # show :: KeyEnv -> String Source # showList :: [KeyEnv] -> ShowS Source #
ReportSchemaErrors m => FromJSON m KeyEnv Source # |
Instance details Defined in Hackage.Security.Key.Env Methods fromJSON :: JSValue -> m KeyEnv Source #
Monad m => ToJSON m KeyEnv Source # |
Instance details Defined in Hackage.Security.Key.Env Methods toJSON :: KeyEnv -> m JSValue Source #

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

# Convenience constructors

fromPublicKeys :: [Some PublicKey] -> KeyEnv Source #

fromKeys :: [Some Key] -> KeyEnv Source #

# The usual accessors

empty :: KeyEnv Source #

null :: KeyEnv -> Bool Source #

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

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

union :: KeyEnv -> KeyEnv -> KeyEnv Source #