Instance Methodvapor 4.114.1Vapor
readSession(_:for:)
MemorySessions.swift:46func readSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<SessionData?>
func readSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<SessionData?>
s5Vapor14MemorySessionsV11readSession_3for7NIOCore15EventLoopFutureCyAA0E4DataVSgGAA0E2IDV_AA7RequestCtF
What are these?52LLW
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct MemorySessions
Simple in-memory sessions implementation.
struct SessionID
final class Request
Represents an HTTP request in an application.
final class EventLoopFuture<Value>
Holder for a result that will be provided later.
struct SessionData
A container for storing data associated with a given SessionID
.
init(storage: Storage)
let storage: Storage
func createSession(_ data: SessionData, for request: Request) -> EventLoopFuture<SessionID>
func deleteSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<Void>
func updateSession(_ sessionID: SessionID, to data: SessionData, for request: Request) -> EventLoopFuture<SessionID>
final class Storage