-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parse development platform web hook messages. -- -- A development platform is a server system which hosts (mostly -- software) projects, version controlled repositories and often provides -- feature like issue tracking, merge requests, project search, project -- wikis and more. -- -- Some development platforms can report various events using web hooks, -- i.e. send HTTP requests containing structured data (e.g. JSON or XML) -- to a specified URL. Then you can run a server which receives these -- messages and reports them to IRC or a mailing list (or anything else -- you like). -- -- This package collects development platform specific types, and -- functions which parse the HTTP message bodies into values of these -- types. Then an actual web hook handler can be written using them. -- -- Why have a single package which handles the various platforms? First, -- because parsing some JSON or XML structures is a simple task requiring -- very little code (thanks to awesome Haskell libraries), sometimes -- hardly worth having its own dedicated package. Second, having them all -- here may allow sharing types and perhaps even developing some common -- web hook formats in the future. -- -- This package handles only free-as-in-freedom development -- platforms. In particular, it means g1thub won't be supported (until it -- becomes free too), while support for all free platforms (DarcsDen, -- Gogs, Kallithea, GitLab's "community edition", etc.) is very welcome. @package vcs-web-hook-parse @version 0.2.0.0 module Web.Hook.Gogs type CommitID = Text type Url = Text data User User :: Text -> Text -> Text -> User [userName] :: User -> Text [userEmail] :: User -> Text [userUsername] :: User -> Text data Commit Commit :: CommitID -> Text -> Url -> User -> Commit [commitId] :: Commit -> CommitID [commitMessage] :: Commit -> Text [commitUrl] :: Commit -> Url [commitAuthor] :: Commit -> User data Repository Repository :: Int -> Text -> Url -> Text -> Url -> Int -> User -> Bool -> Repository [repoId] :: Repository -> Int [repoName] :: Repository -> Text [repoUrl] :: Repository -> Url [repoDescription] :: Repository -> Text [repoWebsite] :: Repository -> Url [repoWatchers] :: Repository -> Int [repoOwner] :: Repository -> User [repoPrivate] :: Repository -> Bool data Push Push :: Text -> Text -> [Commit] -> Repository -> User -> CommitID -> CommitID -> Url -> Push [pushSecret] :: Push -> Text [pushRef] :: Push -> Text [pushCommits] :: Push -> [Commit] [pushRepository] :: Push -> Repository [pushPusher] :: Push -> User [pushBefore] :: Push -> CommitID [pushAfter] :: Push -> CommitID [pushCompareUrl] :: Push -> Url -- | Parse a JSON string (the body of the HTTP request) into event -- information. If parsing fails, return Left an error message. parse :: ByteString -> Either String Push instance GHC.Show.Show Web.Hook.Gogs.Push instance GHC.Show.Show Web.Hook.Gogs.Repository instance GHC.Show.Show Web.Hook.Gogs.Commit instance GHC.Show.Show Web.Hook.Gogs.User instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.Gogs.User instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.Gogs.Commit instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.Gogs.Repository instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.Gogs.Push module Web.Hook.GitLab type CommitID = Text type Url = Text type File = Text data Author Author :: Text -> Text -> Author [authorName] :: Author -> Text [authorEmail] :: Author -> Text data User User :: Text -> Text -> Url -> User [userName] :: User -> Text [userUsername] :: User -> Text [userAvatar] :: User -> Url data Commit Commit :: CommitID -> Text -> Text -> Url -> Author -> [File] -> [File] -> [File] -> Commit [commitId] :: Commit -> CommitID [commitMessage] :: Commit -> Text [commitTimestamp] :: Commit -> Text [commitUrl] :: Commit -> Url [commitAuthor] :: Commit -> Author [commitAdded] :: Commit -> [File] [commitModified] :: Commit -> [File] [commitRemoved] :: Commit -> [File] data MergeEndpoint MergeEndpoint :: Text -> Url -> Url -> Url -> Int -> Text -> MergeEndpoint [mepName] :: MergeEndpoint -> Text [mepSshUrl] :: MergeEndpoint -> Url [mepHttpUrl] :: MergeEndpoint -> Url [mepWebUrl] :: MergeEndpoint -> Url [mepVisibility] :: MergeEndpoint -> Int [mepNamespace] :: MergeEndpoint -> Text data Repository Repository :: Text -> Url -> Text -> Url -> Maybe Url -> Maybe Url -> Maybe Int -> Repository [repoName] :: Repository -> Text [repoUrl] :: Repository -> Url [repoDesc] :: Repository -> Text [repoHomepage] :: Repository -> Url [repoGitHttpUrl] :: Repository -> Maybe Url [repoGitSshUrl] :: Repository -> Maybe Url [repoVisibility] :: Repository -> Maybe Int data Diff Diff :: Text -> Text -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Diff [diffDiff] :: Diff -> Text [diffNewPath] :: Diff -> Text [diffOldPath] :: Diff -> Text [diffAMode] :: Diff -> Text [diffBMode] :: Diff -> Text [diffNewFile] :: Diff -> Bool [diffRenamedFile] :: Diff -> Bool [diffDeletedFile] :: Diff -> Bool data Snippet Snippet :: Int -> Text -> Text -> Int -> Int -> Text -> Text -> Text -> Maybe Text -> Text -> Int -> Snippet [snippetId] :: Snippet -> Int [snippetTitle] :: Snippet -> Text [snippetContent] :: Snippet -> Text [snippetAuthorId] :: Snippet -> Int [snippetProjectId] :: Snippet -> Int [snippetCreatedAt] :: Snippet -> Text [snippetUpdatedAt] :: Snippet -> Text [snippetFileName] :: Snippet -> Text [snippetExpiresAt] :: Snippet -> Maybe Text [snippetType] :: Snippet -> Text [snippetVisibility] :: Snippet -> Int data NoteTarget NTCommit :: Commit -> NoteTarget NTIssue :: Issue -> NoteTarget NTMergeRequest :: MergeRequest -> NoteTarget NTSnippet :: Snippet -> NoteTarget data Issue Issue :: Int -> Text -> Int -> Int -> Int -> Text -> Text -> Int -> Maybe Text -> Text -> Maybe Int -> Text -> Int -> Url -> Issue [issueInternalId] :: Issue -> Int [issueTitle] :: Issue -> Text [issueAssigneeId] :: Issue -> Int [issueAuthorId] :: Issue -> Int [issueProjectId] :: Issue -> Int [issueCreatedAt] :: Issue -> Text [issueUpdatedAt] :: Issue -> Text [issuePosition] :: Issue -> Int [issueBranch] :: Issue -> Maybe Text [issueDescription] :: Issue -> Text [issueMilestoneId] :: Issue -> Maybe Int [issueState] :: Issue -> Text [issueId] :: Issue -> Int [issueUrl] :: Issue -> Url data MergeRequest MergeRequest :: Int -> Text -> Text -> Int -> Int -> Maybe Int -> Text -> Text -> Text -> Maybe Int -> Text -> Text -> Int -> Int -> Text -> MergeEndpoint -> MergeEndpoint -> Commit -> Bool -> Url -> MergeRequest [mrInternalId] :: MergeRequest -> Int [mrTargetBranch] :: MergeRequest -> Text [mrSourceBranch] :: MergeRequest -> Text [mrSourceProjectId] :: MergeRequest -> Int [mrAuthorId] :: MergeRequest -> Int [mrAssigneeId] :: MergeRequest -> Maybe Int [mrTitle] :: MergeRequest -> Text [mrCreatedAt] :: MergeRequest -> Text [mrUpdatedAt] :: MergeRequest -> Text [mrMilestoneId] :: MergeRequest -> Maybe Int [mrState] :: MergeRequest -> Text [mrMergeStatus] :: MergeRequest -> Text [mrTargetProjectId] :: MergeRequest -> Int [mrId] :: MergeRequest -> Int [mrDescription] :: MergeRequest -> Text [mrSource] :: MergeRequest -> MergeEndpoint [mrTarget] :: MergeRequest -> MergeEndpoint [mrLastCommit] :: MergeRequest -> Commit [mrWorkInProgress] :: MergeRequest -> Bool [mrUrl] :: MergeRequest -> Url data Note Note :: Int -> Text -> Int -> Text -> Text -> Int -> Maybe Text -> CommitID -> Maybe Int -> Bool -> Maybe Diff -> Url -> Note [noteId] :: Note -> Int [noteNote] :: Note -> Text [noteAuthorId] :: Note -> Int [noteCreatedAt] :: Note -> Text [noteUpdatedAt] :: Note -> Text [noteProjectId] :: Note -> Int [noteLineCode] :: Note -> Maybe Text [noteCommitId] :: Note -> CommitID [noteNoteableId] :: Note -> Maybe Int [noteSystem] :: Note -> Bool [noteStDiff] :: Note -> Maybe Diff [noteUrl] :: Note -> Url data Push Push :: CommitID -> CommitID -> Text -> Int -> Text -> Text -> Int -> Repository -> [Commit] -> Int -> Push [pushBefore] :: Push -> CommitID [pushAfter] :: Push -> CommitID [pushRef] :: Push -> Text [pushUserId] :: Push -> Int [pushUserName] :: Push -> Text [pushUserEmail] :: Push -> Text [pushProjectId] :: Push -> Int [pushRepository] :: Push -> Repository [pushCommits] :: Push -> [Commit] [pushCommitsTotal] :: Push -> Int data IssueEvent IssueEvent :: User -> Repository -> Issue -> Text -> IssueEvent [ieUser] :: IssueEvent -> User [ieRepo] :: IssueEvent -> Repository [ieIssue] :: IssueEvent -> Issue [ieAction] :: IssueEvent -> Text data MergeRequestEvent MergeRequestEvent :: User -> MergeRequest -> Text -> MergeRequestEvent [mreUser] :: MergeRequestEvent -> User [mreRequest] :: MergeRequestEvent -> MergeRequest [mreAction] :: MergeRequestEvent -> Text data NoteEvent NoteEvent :: User -> Int -> Repository -> Note -> NoteTarget -> NoteEvent [neUser] :: NoteEvent -> User [neProjectId] :: NoteEvent -> Int [neRepo] :: NoteEvent -> Repository [neNote] :: NoteEvent -> Note [neTarget] :: NoteEvent -> NoteTarget data Event EventPush :: Push -> Event EventPushTag :: Push -> Event EventIssue :: IssueEvent -> Event EventMergeRequest :: MergeRequestEvent -> Event EventNote :: NoteEvent -> Event -- | Parse a JSON string (the body of the HTTP request) into event -- information. If parsing fails, return Left an error message. parse :: ByteString -> Either String Event instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Author instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.User instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Commit instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.MergeEndpoint instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Repository instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Issue instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.MergeRequest instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Diff instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Note instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Push instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.IssueEvent instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.MergeRequestEvent instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Snippet instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.NoteEvent instance Data.Aeson.Types.FromJSON.FromJSON Web.Hook.GitLab.Event