Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type family FedApi (comp :: Component) = (api :: Type) | api -> comp
- type HasFedEndpoint comp api name = HasUnsafeFedEndpoint comp api name
- type HasUnsafeFedEndpoint comp api name = 'Just api ~ LookupEndpoint (FedApi comp) name
- class FederationMonad (fedM :: Component -> Type -> Type) where
- fedClientWithProxy :: forall (comp :: Component) name api. (HasClient (fedM comp) api, HasFedEndpoint comp api name, KnownComponent comp, IsNamed name, Typeable (Client (fedM comp) api)) => Proxy name -> Proxy api -> Proxy (fedM comp) -> Client (fedM comp) api
- class IsNamed (name :: k) where
- nameVal :: forall {k} (name :: k). IsNamed name => Text
- fedClient :: forall (comp :: Component) name fedM (showcomp :: Symbol) api. (showcomp ~ ShowComponent comp, HasFedEndpoint comp api name, HasClient (fedM comp) api, KnownComponent comp, IsNamed name, FederationMonad fedM, Typeable (Client (fedM comp) api)) => Client (fedM comp) api
- fedQueueClient :: forall {k} (tag :: k) c. (HasNotificationEndpoint tag, HasVersionRange tag, HasFedPath tag, KnownComponent (NotificationComponent k), ToJSON (Payload tag), c ~ NotificationComponent k) => Payload tag -> FedQueueClient c ()
- sendBundle :: KnownComponent c => PayloadBundle c -> FedQueueClient c ()
- fedClientIn :: forall (comp :: Component) (name :: Symbol) m api. (HasFedEndpoint comp api name, HasClient m api) => Client m api
- module Wire.API.Component
- data Component
- makeConversationUpdateBundle :: ConversationUpdate -> FedQueueClient 'Galley (PayloadBundle 'Galley)
Documentation
type HasFedEndpoint comp api name = HasUnsafeFedEndpoint comp api name Source #
type HasUnsafeFedEndpoint comp api name = 'Just api ~ LookupEndpoint (FedApi comp) name Source #
Like HasFedEndpoint
, but doesn't propagate a CallsFed
constraint.
Useful for tests, but unsafe in the sense that incorrect usage will allow
you to forget about some federated calls.
class FederationMonad (fedM :: Component -> Type -> Type) where Source #
fedClientWithProxy :: forall (comp :: Component) name api. (HasClient (fedM comp) api, HasFedEndpoint comp api name, KnownComponent comp, IsNamed name, Typeable (Client (fedM comp) api)) => Proxy name -> Proxy api -> Proxy (fedM comp) -> Client (fedM comp) api Source #
Instances
FederationMonad FederatorClient Source # | |
Defined in Wire.API.Federation.API fedClientWithProxy :: forall {k} (comp :: Component) (name :: k) api. (HasClient (FederatorClient comp) api, HasFedEndpoint comp api name, KnownComponent comp, IsNamed name, Typeable (Client (FederatorClient comp) api)) => Proxy name -> Proxy api -> Proxy (FederatorClient comp) -> Client (FederatorClient comp) api Source # |
fedClient :: forall (comp :: Component) name fedM (showcomp :: Symbol) api. (showcomp ~ ShowComponent comp, HasFedEndpoint comp api name, HasClient (fedM comp) api, KnownComponent comp, IsNamed name, FederationMonad fedM, Typeable (Client (fedM comp) api)) => Client (fedM comp) api Source #
Return a client for a named endpoint.
fedQueueClient :: forall {k} (tag :: k) c. (HasNotificationEndpoint tag, HasVersionRange tag, HasFedPath tag, KnownComponent (NotificationComponent k), ToJSON (Payload tag), c ~ NotificationComponent k) => Payload tag -> FedQueueClient c () Source #
sendBundle :: KnownComponent c => PayloadBundle c -> FedQueueClient c () Source #
fedClientIn :: forall (comp :: Component) (name :: Symbol) m api. (HasFedEndpoint comp api name, HasClient m api) => Client m api Source #
module Wire.API.Component
Re-exports
Instances
Arbitrary Component | |
FromJSON Component | |
ToJSON Component | |
Generic Component | |
Show Component | |
Eq Component | |
FromHttpApiData Component | |
Defined in Wire.API.Component | |
ToHttpApiData Component | |
Defined in Wire.API.Component toUrlPiece :: Component -> Text Source # toEncodedUrlPiece :: Component -> Builder Source # toHeader :: Component -> ByteString Source # toQueryParam :: Component -> Text Source # | |
ToSchema Component | |
Defined in Wire.API.Component | |
type Rep Component | |
Defined in Wire.API.Component type Rep Component = D1 ('MetaData "Component" "Wire.API.Component" "wire-api-0.1.0-EbZS9CKNOfZ8BBy5DRJfXi" 'False) (C1 ('MetaCons "Brig" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Galley" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cargohold" 'PrefixI 'False) (U1 :: Type -> Type))) |