mirror of
https://github.com/github/semantic.git
synced 2024-11-27 12:57:49 +03:00
Move User.hs
This commit is contained in:
parent
3cd4ffc9c3
commit
869bd26cae
@ -87,7 +87,6 @@ library
|
||||
, Data.GitHub.IPVersion
|
||||
, Proto3.Google.Timestamp
|
||||
, Data.GitHub.Spamurai
|
||||
, Data.GitHub.User
|
||||
, Data.Graph
|
||||
, Data.Graph.ControlFlowVertex
|
||||
, Data.Graph.TermVertex
|
||||
|
@ -1,52 +0,0 @@
|
||||
{-# LANGUAGE DeriveAnyClass, DerivingVia #-}
|
||||
|
||||
module Data.GitHub.User
|
||||
( User (..)
|
||||
, Type (..)
|
||||
, monalisa
|
||||
) where
|
||||
|
||||
import Prologue
|
||||
|
||||
import Proto3.Suite
|
||||
import Proto3.Suite.Exts
|
||||
|
||||
import Proto3.Google.Timestamp
|
||||
import Data.GitHub.Spamurai (SpamuraiClassification (Hammy))
|
||||
|
||||
data Type
|
||||
= Unknown
|
||||
| Standard
|
||||
| Organization
|
||||
| Bot
|
||||
deriving (Eq, Show, Enum, Bounded, MessageField, Named, Generic)
|
||||
deriving Primitive via PrimitiveEnum Type
|
||||
|
||||
instance HasDefault Type where def = Unknown
|
||||
|
||||
data User = User
|
||||
{ userId :: Word32
|
||||
, userLogin :: Text
|
||||
, userType :: Type
|
||||
, userBillingPlan :: Text
|
||||
, userSpammy :: Bool
|
||||
, userGlobalRelayId :: Text
|
||||
, userCreatedAt :: Nested Timestamp
|
||||
, userSuspended :: Bool
|
||||
, userSpamuraiCalculation :: SpamuraiClassification
|
||||
, userAnalyticsTrackingId :: Text
|
||||
} deriving (Eq, Show, Generic, Message, Named)
|
||||
|
||||
monalisa :: User
|
||||
monalisa = User
|
||||
{ userId = 1
|
||||
, userLogin = "monalisa"
|
||||
, userType = Bot
|
||||
, userBillingPlan = "medium"
|
||||
, userSpammy = False
|
||||
, userGlobalRelayId = "global"
|
||||
, userCreatedAt = Absent
|
||||
, userSuspended = False
|
||||
, userSpamuraiCalculation = Hammy
|
||||
, userAnalyticsTrackingId = "MACHHOMMY"
|
||||
}
|
@ -10,7 +10,7 @@ import Proto3.Suite.Exts
|
||||
|
||||
import Data.GitHub.Envelope
|
||||
import Proto3.GitHub.Event.RepositoryPush
|
||||
import Data.GitHub.User
|
||||
import Proto3.GitHub.User
|
||||
|
||||
sampleEnvelope :: ByteString
|
||||
sampleEnvelope = "\n?hydro-schemas.github.net/hydro.schemas.github.v1.RepositoryPush\DC2\173\ETX\DC2N\b\SOH\DC2\bmonalisa\CAN\SOH\"\ACKmedium2\fMDQ6VXNlcjE=:\ACK\b\143\203\207\224\ENQR 3b7489995ba5925f6d6c4a86f8adc22f\SUBN\b\SOH\DC2\bmonalisa\CAN\SOH\"\ACKmedium2\fMDQ6VXNlcjE=:\ACK\b\143\203\207\224\ENQR 3b7489995ba5925f6d6c4a86f8adc22f\">\b\SOH\DC2\DC4MDEwOlJlcG9zaXRvcnkx\SUB\EOTtest(\SOHJ\f\b\156\242\136\226\ENQ\DLE\152\180\147\234\STXR\ACK\b\206\157\190\225\ENQZ\ACK\b\162\254\205\225\ENQ*(3fe2053d3e6b3a028c043288cdc5e3d9c794ab892(226958130ebe39c068833070802897497b7778d2:\SYNrefs/heads/test-branchB_\n(0000000000000000000000000000000000000000\DC2(e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\SUB\SOHA\"\ACKfoo.py\SUB$a39f0025-8ff2-4d46-ac21-d0a28e7734e4\"\f\b\159\242\136\226\ENQ\DLE\176\197\170\210\SOH(\SOH"
|
||||
|
Loading…
Reference in New Issue
Block a user