Chaqmoq

public final class Chaqmoq : RouteCollection.Builder

Helps to create, run and shutdown Chaqmoq applications.

  • Undocumented

    Declaration

    Swift

    public let configuration: Configuration
  • Undocumented

    Declaration

    Swift

    public let logger: Logger
  • Undocumented

    Declaration

    Swift

    public let router: Router
  • Undocumented

    Declaration

    Swift

    public let server: Server
  • Undocumented

    Declaration

    Swift

    public let templating: Yaproq
  • Undocumented

    Declaration

    Swift

    public var eventLoopGroup: EventLoopGroup { get }
  • Initializes a new instance of Chaqmoq application with the default Configuration.

    Declaration

    Swift

    public init(configuration: Configuration = .init())

    Parameters

    configuration

    An app Configuration.

  • Runs an application.

    Throws

    An error if an application can’t be run.

    Declaration

    Swift

    public func run() throws
  • Shutdowns an application.

    Throws

    An error if an application can’t be shutdown.

    Declaration

    Swift

    public func shutdown() throws
  • Undocumented

    See more

    Declaration

    Swift

    public struct Configuration
  • Generates a URL for Route by name, path’s parameters and query strings.

    Declaration

    Swift

    public func generateURLForRoute(
        named name: String,
        parameters: Parameters<String, String>? = nil,
        query: Parameters<String, String>? = nil
    ) -> URL?

    Parameters

    name

    A unique name for Route.

    parameters

    A Route‘s path parameters. Defaults to nil.

    query

    A dictionary of query strings. Defaults to nil.

    Return Value

    A generated URL or nil.