RouteBuilder

open class RouteBuilder

Undocumented

  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func delete(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func get(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func head(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func options(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func patch(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func post(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func put(
        _ path: String = Route.defaultPath,
        name: String = "",
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> Route?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func request(
        _ path: String = Route.defaultPath,
        methods: Set<Request.Method> = Set(Request.Method.allCases),
        middleware: [Middleware] = .init(),
        handler: @escaping Route.Handler
    ) -> [Route]