Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Orion a = ReaderT OrionConfig (ExceptT OrionError IO) a
- data OrionError
- data OrionConfig = OrionConfig {
- _orionUrl :: Text
- _fiwareService :: Text
- defaultOrionConfig :: OrionConfig
- runOrion :: Orion a -> OrionConfig -> IO (Either OrionError a)
- newtype EntityId = EntityId {
- unEntityId :: Text
- type EntityType = Text
- data Entity = Entity {}
- newtype AttributeId = AttributeId {}
- type AttributeType = Text
- data Attribute = Attribute {}
- newtype MetadataId = MetadataId {}
- type MetadataType = Text
- data Metadata = Metadata {}
- data SubStatus
- newtype SubId = SubId {}
- data Subscription = Subscription {}
- data SubSubject = SubSubject {}
- data SubEntity = SubEntity {
- subEntId :: EntityId
- subEntType :: Maybe Text
- data SubNotif = SubNotif {}
- data SubCondition = SubCondition {}
- data SubHttpCustom = SubHttpCustom {
- subUrl :: Text
- subPayload :: Text
- subMethod :: Text
- subHeaders :: Map Text Text
- type Path = Text
- mergeAeson :: [Value] -> Value
- unCapitalize :: String -> String
- orionUrl :: Lens' OrionConfig Text
- fiwareService :: Lens' OrionConfig Text
Orion monad
type Orion a = ReaderT OrionConfig (ExceptT OrionError IO) a Source #
data OrionError Source #
HTTPError HttpException | Keycloak returned an HTTP error. |
ParseError Text | Failed when parsing the response |
EmptyError | Empty error to serve as a zero element for Monoid. |
Orion config
data OrionConfig Source #
Instances
Eq OrionConfig Source # | |
Defined in Orion.Types (==) :: OrionConfig -> OrionConfig -> Bool # (/=) :: OrionConfig -> OrionConfig -> Bool # | |
Show OrionConfig Source # | |
Defined in Orion.Types showsPrec :: Int -> OrionConfig -> ShowS # show :: OrionConfig -> String # showList :: [OrionConfig] -> ShowS # |
runOrion :: Orion a -> OrionConfig -> IO (Either OrionError a) Source #
Run an Orion monad within IO.
Entities
type EntityType = Text Source #
Entity | |
|
Instances
Show Entity Source # | |
Generic Entity Source # | |
ToJSON Entity Source # | |
Defined in Orion.Types | |
FromJSON Entity Source # | |
type Rep Entity Source # | |
Defined in Orion.Types type Rep Entity = D1 (MetaData "Entity" "Orion.Types" "orion-hs-0.1.3-22eqz65bH53ZTEYnAh5lP" False) (C1 (MetaCons "Entity" PrefixI True) (S1 (MetaSel (Just "entId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 EntityId) :*: (S1 (MetaSel (Just "entType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 EntityType) :*: S1 (MetaSel (Just "entAttrs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map AttributeId Attribute))))) |
Attributes
newtype AttributeId Source #
Instances
type AttributeType = Text Source #
Instances
Show Attribute Source # | |
Generic Attribute Source # | |
ToJSON Attribute Source # | |
Defined in Orion.Types | |
FromJSON Attribute Source # | |
type Rep Attribute Source # | |
Defined in Orion.Types type Rep Attribute = D1 (MetaData "Attribute" "Orion.Types" "orion-hs-0.1.3-22eqz65bH53ZTEYnAh5lP" False) (C1 (MetaCons "Attribute" PrefixI True) (S1 (MetaSel (Just "attType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AttributeType) :*: (S1 (MetaSel (Just "attValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Value)) :*: S1 (MetaSel (Just "attMetadata") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map MetadataId Metadata))))) |
Metadata
newtype MetadataId Source #
Instances
type MetadataType = Text Source #
Instances
Show Metadata Source # | |
Generic Metadata Source # | |
ToJSON Metadata Source # | |
Defined in Orion.Types | |
FromJSON Metadata Source # | |
type Rep Metadata Source # | |
Defined in Orion.Types type Rep Metadata = D1 (MetaData "Metadata" "Orion.Types" "orion-hs-0.1.3-22eqz65bH53ZTEYnAh5lP" False) (C1 (MetaCons "Metadata" PrefixI True) (S1 (MetaSel (Just "metType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MetadataType)) :*: S1 (MetaSel (Just "metValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Value)))) |
Subscriptions
Instances
Eq SubStatus Source # | |
Show SubStatus Source # | |
Generic SubStatus Source # | |
ToJSON SubStatus Source # | |
Defined in Orion.Types | |
FromJSON SubStatus Source # | |
type Rep SubStatus Source # | |
Defined in Orion.Types type Rep SubStatus = D1 (MetaData "SubStatus" "Orion.Types" "orion-hs-0.1.3-22eqz65bH53ZTEYnAh5lP" False) ((C1 (MetaCons "SubActive" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SubInactive" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "SubFailed" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SubExpired" PrefixI False) (U1 :: Type -> Type))) |
data Subscription Source #
one subscription
Subscription | |
|
Instances
data SubSubject Source #
Instances
Instances
Eq SubEntity Source # | |
Show SubEntity Source # | |
Generic SubEntity Source # | |
ToJSON SubEntity Source # | |
Defined in Orion.Types | |
FromJSON SubEntity Source # | |
type Rep SubEntity Source # | |
Defined in Orion.Types type Rep SubEntity = D1 (MetaData "SubEntity" "Orion.Types" "orion-hs-0.1.3-22eqz65bH53ZTEYnAh5lP" False) (C1 (MetaCons "SubEntity" PrefixI True) (S1 (MetaSel (Just "subEntId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 EntityId) :*: S1 (MetaSel (Just "subEntType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))) |
SubNotif | |
|
Instances
data SubCondition Source #
Instances
data SubHttpCustom Source #
SubHttpCustom | |
|
Instances
mergeAeson :: [Value] -> Value Source #
unCapitalize :: String -> String Source #