wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.VersionInfo

Synopsis

Version info

Version utilities

type VersionHeader = "X-Wire-API-Version" Source #

Servant combinators

data From v Source #

Instances

Instances details
RoutesToPaths api => RoutesToPaths (From v :> api :: Type) Source # 
Instance details

Defined in Wire.API.VersionInfo

(VersionedMonad (Demote v) m, SingI n, Ord (Demote v), SingKind v, HasClientAlgebra m api) => HasClient m (From n :> api) Source # 
Instance details

Defined in Wire.API.VersionInfo

Associated Types

type Client m (From n :> api) Source #

Methods

clientWithRoute :: Proxy m -> Proxy (From n :> api) -> Request -> Client m (From n :> api) Source #

hoistClientMonad :: Proxy m -> Proxy (From n :> api) -> (forall x. mon x -> mon' x) -> Client mon (From n :> api) -> Client mon' (From n :> api) Source #

(SingI n, Ord (Demote v), Enum (Demote v), SingKind v, HasServer api ctx) => HasServer (From n :> api :: Type) ctx Source # 
Instance details

Defined in Wire.API.VersionInfo

Associated Types

type ServerT (From n :> api) m Source #

Methods

route :: Proxy (From n :> api) -> Context ctx -> Delayed env (Server (From n :> api)) -> Router env Source #

hoistServerWithContext :: Proxy (From n :> api) -> Proxy ctx -> (forall x. m x -> n0 x) -> ServerT (From n :> api) m -> ServerT (From n :> api) n0 Source #

type SpecialiseToVersion (v :: k) (From w :> api) Source # 
Instance details

Defined in Wire.API.Routes.SpecialiseToVersion

type SpecialiseToVersion (v :: k) (From w :> api) = If (v < w) EmptyAPI (SpecialiseToVersion v api)
type Client m (From n :> api) Source # 
Instance details

Defined in Wire.API.VersionInfo

type Client m (From n :> api) = Client m api
type SpecialiseToVersion v (From w :> api) Source # 
Instance details

Defined in Wire.API.Routes.Version

type SpecialiseToVersion v (From w :> api) = If (v < w) EmptyAPI (SpecialiseToVersion v api)
type ServerT (From n :> api :: Type) m Source # 
Instance details

Defined in Wire.API.VersionInfo

type ServerT (From n :> api :: Type) m = ServerT api m

data Until v Source #

Instances

Instances details
RoutesToPaths api => RoutesToPaths (Until v :> api :: Type) Source # 
Instance details

Defined in Wire.API.VersionInfo

(VersionedMonad (Demote v) m, SingI n, Ord (Demote v), SingKind v, HasClientAlgebra m api) => HasClient m (Until n :> api) Source # 
Instance details

Defined in Wire.API.VersionInfo

Associated Types

type Client m (Until n :> api) Source #

Methods

clientWithRoute :: Proxy m -> Proxy (Until n :> api) -> Request -> Client m (Until n :> api) Source #

hoistClientMonad :: Proxy m -> Proxy (Until n :> api) -> (forall x. mon x -> mon' x) -> Client mon (Until n :> api) -> Client mon' (Until n :> api) Source #

(SingI n, Ord (Demote v), Enum (Demote v), SingKind v, HasServer api ctx) => HasServer (Until n :> api :: Type) ctx Source # 
Instance details

Defined in Wire.API.VersionInfo

Associated Types

type ServerT (Until n :> api) m Source #

Methods

route :: Proxy (Until n :> api) -> Context ctx -> Delayed env (Server (Until n :> api)) -> Router env Source #

hoistServerWithContext :: Proxy (Until n :> api) -> Proxy ctx -> (forall x. m x -> n0 x) -> ServerT (Until n :> api) m -> ServerT (Until n :> api) n0 Source #

type SpecialiseToVersion (v :: k) (Until w :> api) Source # 
Instance details

Defined in Wire.API.Routes.SpecialiseToVersion

type SpecialiseToVersion (v :: k) (Until w :> api) = If (v < w) (SpecialiseToVersion v api) EmptyAPI
type Client m (Until n :> api) Source # 
Instance details

Defined in Wire.API.VersionInfo

type Client m (Until n :> api) = Client m api
type SpecialiseToVersion v (Until w :> api) Source # 
Instance details

Defined in Wire.API.Routes.Version

type ServerT (Until n :> api :: Type) m Source # 
Instance details

Defined in Wire.API.VersionInfo

type ServerT (Until n :> api :: Type) m = ServerT api m

class VersionedMonad v m where Source #

Methods

guardVersion :: (v -> Bool) -> m () Source #