maca/postgrest-admin-preview/15.0.0

PostgRestAdmin.MountPath

PostgRestAdmin mount path and url generation.

Represents a path where PostgRestAdmin is mounted. See Config.mountPath to mount it at any path other than /.

fromString : String -> MountPath

Build from String.

fromString "admin" == fromString "/admin"


fromString "" == fromString "/"
segments : MountPath -> List String

Convert to a list of path segments.

segments (fromString "/my/mount/point") == [ "my", "mount", "point" ]

Path building

path : MountPath -> String -> String

Build a path prepended by the endpoint.

path (fromString "admin") "some/path" == "/admin/some/path"