Idris2Doc : Pact.API.Component

Pact.API.Component

(source)
Define the component of a path.

Definitions

data Component : Type -> Vect n Type -> Type -> Type
Totality: total
Visibility: public export
Constructors:
StaticPath : String -> Component () [()] Void
  Static path segment, e.g. "users"
Capture : String -> (a : Type) -> Component a [a] Void
  Captured path segment, e.g. ":id"
ReqBody : (a : Type) -> Component () [()] a
  Request body, e.g. UserCreateRequest
(:/) : Component tl [tl] Void -> Component tr tsr reqBody -> Component tl (tl :: tsr) reqBody
  Concatenate two paths, e.g. "users/:id/todos"
isReqBody : Component t ts reqBody -> Bool
Visibility: public export
PathReqBody : Component t ts reqBody -> Type
Visibility: public export
hasReqBody : Component t ts reqBody -> Bool
Visibility: public export
getCaptureName : Component t {_:12307} {_:12306} -> String
  Get the name of a capture path segment
@ path The path to get the name of
@ return The name of the capture path segment

Visibility: public export
matchPath : Component t ts reqBody' -> Vect m String -> All FromHttpApiData ts => Either String (HVect ts)
  Match a path against a list of path segments.

@path The path to match.
@segs The list of path segments.
@allprf A proof that all the path segments are path parameters.

Returns a list of the parsed path parameters.

Visibility: public export
GetPathType : Component {_:12903} ts reqBody' -> Type -> Type
  Get the type of the path.
@ts The types of the path parameters.
@path The path.
@epType The type of the endpoint.

Returns the type of the path.

Visibility: public export