| License | AGPL-3 |
|---|---|
| Maintainer | stu235271@mail.uni-kiel.de stu236925@mail.uni-kiel.de |
| Safe Haskell | None |
| Language | Haskell2010 |
Docs.Comment
Description
This module contains schemas and utility functions for comments.
Synopsis
- newtype CommentID = CommentID {
- unCommentID :: Int64
- data Status
- data Comment = Comment {}
- data Message = Message {}
- data CommentRef = CommentRef TextElementRef CommentID
- data CommentAnchor = CommentAnchor {}
- data Range
- data Anchor = Anchor {}
- range :: Anchor -> Anchor -> Range
- prettyPrintCommentRef :: CommentRef -> String
Documentation
Unique identifier for a comment
Constructors
| CommentID | |
Fields
| |
Instances
| FromJSON CommentID Source # | |
Defined in Docs.Comment | |
| ToJSON CommentID Source # | |
Defined in Docs.Comment Methods toEncoding :: CommentID -> Encoding toJSONList :: [CommentID] -> Value toEncodingList :: [CommentID] -> Encoding | |
| Show CommentID Source # | |
| Eq CommentID Source # | |
| Ord CommentID Source # | |
| FromHttpApiData CommentID Source # | |
Defined in Docs.Comment Methods parseUrlPiece :: Text -> Either Text CommentID parseHeader :: ByteString -> Either Text CommentID parseQueryParam :: Text -> Either Text CommentID | |
| ToParamSchema CommentID Source # | |
Defined in Docs.Comment Methods toParamSchema :: Proxy CommentID -> Schema | |
| ToSchema CommentID Source # | |
Defined in Docs.Comment Methods declareNamedSchema :: Proxy CommentID -> Declare (Definitions Schema) NamedSchema | |
Wether a comment is still open or resolved
Instances
An existing comment present in the database
Constructors
| Comment | |
Instances
| FromJSON Comment Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON Comment Source # | |||||
Defined in Docs.Comment Methods toEncoding :: Comment -> Encoding toJSONList :: [Comment] -> Value toEncodingList :: [Comment] -> Encoding | |||||
| Generic Comment Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| ToSchema Comment Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy Comment -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep Comment Source # | |||||
Defined in Docs.Comment type Rep Comment = D1 ('MetaData "Comment" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "Comment" 'PrefixI 'True) ((S1 ('MetaSel ('Just "identifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommentID) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)) :*: (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Message) :*: S1 ('MetaSel ('Just "replies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Message))))) | |||||
The message of a comment or a reply
Instances
| FromJSON Message Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON Message Source # | |||||
Defined in Docs.Comment Methods toEncoding :: Message -> Encoding toJSONList :: [Message] -> Value toEncodingList :: [Message] -> Encoding | |||||
| Generic Message Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| ToSchema Message Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy Message -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep Message Source # | |||||
Defined in Docs.Comment type Rep Message = D1 ('MetaData "Message" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "Message" 'PrefixI 'True) (S1 ('MetaSel ('Just "author") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserRef) :*: (S1 ('MetaSel ('Just "timestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) | |||||
data CommentRef Source #
References a comment of a TextElement
Constructors
| CommentRef TextElementRef CommentID |
Instances
| FromJSON CommentRef Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON CommentRef Source # | |||||
Defined in Docs.Comment Methods toJSON :: CommentRef -> Value toEncoding :: CommentRef -> Encoding toJSONList :: [CommentRef] -> Value toEncodingList :: [CommentRef] -> Encoding omitField :: CommentRef -> Bool | |||||
| Generic CommentRef Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| ToSchema CommentRef Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy CommentRef -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep CommentRef Source # | |||||
Defined in Docs.Comment type Rep CommentRef = D1 ('MetaData "CommentRef" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "CommentRef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextElementRef) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommentID))) | |||||
data CommentAnchor Source #
Ties a comment to a specific text passage
Constructors
| CommentAnchor | |
Instances
| FromJSON CommentAnchor Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON CommentAnchor Source # | |||||
Defined in Docs.Comment Methods toJSON :: CommentAnchor -> Value toEncoding :: CommentAnchor -> Encoding toJSONList :: [CommentAnchor] -> Value toEncodingList :: [CommentAnchor] -> Encoding omitField :: CommentAnchor -> Bool | |||||
| Generic CommentAnchor Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| Eq CommentAnchor Source # | |||||
Defined in Docs.Comment Methods (==) :: CommentAnchor -> CommentAnchor -> Bool # (/=) :: CommentAnchor -> CommentAnchor -> Bool # | |||||
| Ord CommentAnchor Source # | |||||
Defined in Docs.Comment Methods compare :: CommentAnchor -> CommentAnchor -> Ordering # (<) :: CommentAnchor -> CommentAnchor -> Bool # (<=) :: CommentAnchor -> CommentAnchor -> Bool # (>) :: CommentAnchor -> CommentAnchor -> Bool # (>=) :: CommentAnchor -> CommentAnchor -> Bool # max :: CommentAnchor -> CommentAnchor -> CommentAnchor # min :: CommentAnchor -> CommentAnchor -> CommentAnchor # | |||||
| ToSchema CommentAnchor Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy CommentAnchor -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep CommentAnchor Source # | |||||
Defined in Docs.Comment type Rep CommentAnchor = D1 ('MetaData "CommentAnchor" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "CommentAnchor" 'PrefixI 'True) (S1 ('MetaSel ('Just "comment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CommentID) :*: S1 ('MetaSel ('Just "anchor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range))) | |||||
Text passage
Instances
| FromJSON Range Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON Range Source # | |||||
Defined in Docs.Comment Methods toEncoding :: Range -> Encoding toJSONList :: [Range] -> Value toEncodingList :: [Range] -> Encoding | |||||
| Generic Range Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| Eq Range Source # | |||||
| Ord Range Source # | |||||
| ToSchema Range Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy Range -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep Range Source # | |||||
Defined in Docs.Comment type Rep Range = D1 ('MetaData "Range" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Anchor) :*: S1 ('MetaSel ('Just "end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Anchor))) | |||||
Text location
Instances
| FromJSON Anchor Source # | |||||
Defined in Docs.Comment | |||||
| ToJSON Anchor Source # | |||||
Defined in Docs.Comment Methods toEncoding :: Anchor -> Encoding toJSONList :: [Anchor] -> Value toEncodingList :: [Anchor] -> Encoding | |||||
| Generic Anchor Source # | |||||
Defined in Docs.Comment Associated Types
| |||||
| Eq Anchor Source # | |||||
| Ord Anchor Source # | |||||
| ToSchema Anchor Source # | |||||
Defined in Docs.Comment Methods declareNamedSchema :: Proxy Anchor -> Declare (Definitions Schema) NamedSchema | |||||
| type Rep Anchor Source # | |||||
Defined in Docs.Comment type Rep Anchor = D1 ('MetaData "Anchor" "Docs.Comment" "backend-0.1.0.0-2H73EnUlGVcEtlIi2XNQz3" 'False) (C1 ('MetaCons "Anchor" 'PrefixI 'True) (S1 ('MetaSel ('Just "col") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64) :*: S1 ('MetaSel ('Just "row") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) | |||||
prettyPrintCommentRef :: CommentRef -> String Source #
Obtain a human readable representation of a CommentRef