module Patrol.Type.EventType where
import qualified Data.Aeson as Aeson
data EventType
= Csp
| Default
| Error
| Expectct
| Expectstaple
| Hpkp
| Transaction
deriving (EventType -> EventType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventType -> EventType -> Bool
$c/= :: EventType -> EventType -> Bool
== :: EventType -> EventType -> Bool
$c== :: EventType -> EventType -> Bool
Eq, Int -> EventType -> ShowS
[EventType] -> ShowS
EventType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventType] -> ShowS
$cshowList :: [EventType] -> ShowS
show :: EventType -> String
$cshow :: EventType -> String
showsPrec :: Int -> EventType -> ShowS
$cshowsPrec :: Int -> EventType -> ShowS
Show)
instance Aeson.ToJSON EventType where
toJSON :: EventType -> Value
toJSON EventType
eventType = forall a. ToJSON a => a -> Value
Aeson.toJSON forall a b. (a -> b) -> a -> b
$ case EventType
eventType of
EventType
Csp -> String
"csp"
EventType
Default -> String
"default"
EventType
Error -> String
"error"
EventType
Expectct -> String
"expectct"
EventType
Expectstaple -> String
"expectstaple"
EventType
Hpkp -> String
"hpkp"
EventType
Transaction -> String
"transaction"