compendium-client-0.2.1.1: Client for the Compendium schema server
Safe HaskellNone
LanguageHaskell2010

Compendium.Client

Description

Client for the Compendium schema registry

Synopsis

Generic query of schemas

data IdlName Source #

Interface Description Languages supported by Compendium.

Instances

Instances details
Eq IdlName Source # 
Instance details

Defined in Compendium.Client

Methods

(==) :: IdlName -> IdlName -> Bool #

(/=) :: IdlName -> IdlName -> Bool #

Show IdlName Source # 
Instance details

Defined in Compendium.Client

Generic IdlName Source # 
Instance details

Defined in Compendium.Client

Associated Types

type Rep IdlName :: Type -> Type #

Methods

from :: IdlName -> Rep IdlName x #

to :: Rep IdlName x -> IdlName #

ToHttpApiData IdlName Source # 
Instance details

Defined in Compendium.Client

type Rep IdlName Source # 
Instance details

Defined in Compendium.Client

type Rep IdlName = D1 ('MetaData "IdlName" "Compendium.Client" "compendium-client-0.2.1.1-5jiThMz8XbZF8uvAxqq5Ne" 'False) ((C1 ('MetaCons "Avro" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Protobuf" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Mu" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OpenApi" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Scala" 'PrefixI 'False) (U1 :: Type -> Type))))

transformation Source #

Arguments

:: Manager

Connection details (from 'http-client').

-> BaseUrl

URL in which Compendium is running.

-> Text

Name that identifies the schema.

-> IdlName

Format of the returned schema.

-> IO (Either ClientError Text) 

Obtain a schema from the registry.

Query Protocol Buffer schemas

obtainProtoBuf :: Manager -> BaseUrl -> Text -> IO (Either ObtainProtoBufError ProtoBuf) Source #

Obtain a schema from the registry, and parse it as Protocol Buffers.

data ObtainProtoBufError Source #

Errors which may arise during obtainProtoBuf.

Constructors

OPEClient ClientError

Error obtaining schema from Compendium

OPEParse (ParseErrorBundle Text Char)

Obtaining the schema was OK, error parsing it

Instances

Instances details
Show ObtainProtoBufError Source # 
Instance details

Defined in Compendium.Client