Movatterモバイル変換


[0]ホーム

URL:


Hackage :: [Package]

language-avro:Language definition and parser for AVRO files.

[apache,library,network ] [Propose Tags ] [Report a vulnerability ]

Parser for the AVRO language specification, see README.md for more details.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions[RSS]0.1.0.0,0.1.1.0,0.1.2.0,0.1.3.0,0.1.3.1,0.1.4.0
Dependenciesavro (>=0.5.1),base (>=4.12 && <5),containers,directory,filepath,megaparsec,text,vector [details]
LicenseApache-2.0
CopyrightCopyright © 2019-2022 <http://47deg.com 47 Degrees>
AuthorFlavio Corpa
Maintainerflaviocorpa@gmail.com
UploadedbyFlavioCorpa at2022-01-20T14:59:34Z
CategoryNetwork
Home pagehttps://github.com/kutyel/avro-parser-haskell#readme
DistributionsLTSHaskell:0.1.4.0, Stackage:0.1.4.0
Reverse Dependencies1 direct, 4 indirect [details]
Downloads2078 total (26 in the last 30 days)
Rating2.0 (votes: 1)[estimated byBayesian average]
Your Rating
  • λ
  • λ
  • λ
StatusDocs available[build log]
Last success reported on 2022-01-20[all 1 reports]

Readme for language-avro-0.1.4.0

[back to package description]

avro-parser-haskell

Actions StatusHackageStackage NightlyStackage LTSHackage-Depsormolu

Language definition and parser for AVRO (.avdl) files.

Example

#!/usr/bin/env stack-- stack --resolver lts-18.19 script --package language-avro,pretty-simplemodule Main whereimport Language.Avro.Parser (readWithImports)import Text.Pretty.Simple (pPrint)main :: IO ()main =  readWithImports "test" "PeopleService.avdl"    >>= either putStrLn pPrint-- λ>-- Protocol--   { ns = Just--       ( Namespace--           [ "example"--           , "seed"--           , "server"--           , "protocol"--           , "avro"--           ]--       )--   , pname = "PeopleService"--   , imports = [ IdlImport "People.avdl" ]--   , types =--       [ Record--           { name = "Person"--           , aliases = []--           , doc = Nothing--           , order = Nothing--           , fields =--               [ Field--                   { fldName = "name"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = String { logicalTypeS = Nothing }--                   , fldDefault = Nothing--                   }--               , Field--                   { fldName = "age"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = Int { logicalTypeI = Nothing }--                   , fldDefault = Nothing--                   }--               ]--           }--       , Record--           { name = "NotFoundError"--           , aliases = []--           , doc = Nothing--           , order = Nothing--           , fields =--               [ Field--                   { fldName = "message"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = String { logicalTypeS = Nothing }--                   , fldDefault = Nothing--                   }--               ]--           }--       , Record--           { name = "DuplicatedPersonError"--           , aliases = []--           , doc = Nothing--           , order = Nothing--           , fields =--               [ Field--                   { fldName = "message"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = String { logicalTypeS = Nothing }--                   , fldDefault = Nothing--                   }--               ]--           }--       , Record--           { name = "PeopleRequest"--           , aliases = []--           , doc = Nothing--           , order = Nothing--           , fields =--               [ Field--                   { fldName = "name"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = String { logicalTypeS = Nothing }--                   , fldDefault = Nothing--                   }--               ]--           }--       , Record--           { name = "PeopleResponse"--           , aliases = []--           , doc = Nothing--           , order = Nothing--           , fields =--               [ Field--                   { fldName = "result"--                   , fldAliases = []--                   , fldDoc = Nothing--                   , fldOrder = Nothing--                   , fldType = Union--                       { options =--                           [ NamedType "Person"--                           , NamedType "NotFoundError"--                           , NamedType "DuplicatedPersonError"--                           ]--                       }--                   , fldDefault = Nothing--                   }--               ]--           }--       ]--   , messages =--       [ Method--           { mname = "getPerson"--           , args =--               [ Argument--                   { atype = NamedType "example.seed.server.protocol.avro.PeopleRequest"--                   , aname = "request"--                   }--               ]--           , result = NamedType "example.seed.server.protocol.avro.PeopleResponse"--           , throws = Null--           , oneway = False--           }--       ]--   }

⚠️ Warning:readWithImports only works right now if the import type is"idl"!

Produced byhackage andCabal 3.16.1.0.


[8]ページ先頭

©2009-2026 Movatter.jp