Initial commit.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import Hummingbird
|
||||
import Infrastructure
|
||||
|
||||
/// A ``LocalizedRequestContext`` carrying the core storage and the negotiated language only.
|
||||
struct StubRequestContext: LocalizedRequestContext {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// The core request context storage Hummingbird requires.
|
||||
var coreContext: CoreRequestContextStorage
|
||||
|
||||
/// The language identifier negotiated for the request.
|
||||
var language: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
/// Creates a request context for the given source.
|
||||
/// - Parameter source: the source the context is initialized from.
|
||||
init(
|
||||
source: Source
|
||||
) {
|
||||
self.coreContext = .init(source: source)
|
||||
self.language = ""
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user