Instance Method (Default implementation)vapor 4.114.1Vapor
createSession(_:for:)
AsyncSessionDriver.swift:14func createSession(_ data: SessionData, for request: Request) -> EventLoopFuture<SessionID>
func createSession(_ data: SessionData, for request: Request) -> EventLoopFuture<SessionID>
s5Vapor18AsyncSessionDriverPAAE06createC0_3for7NIOCore15EventLoopFutureCyAA0C2IDVGAA0C4DataV_AA7RequestCtF
What are these?6UO59
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.
protocol AsyncSessionDriver : SessionDriver
Capable of managing CRUD operations for Session
s.
struct SessionData
A container for storing data associated with a given 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 SessionID
func createSession(_ data: SessionData, for request: Request) -> EventLoopFuture<SessionID>
func createSession(_ data: SessionData, for request: Request) async throws -> SessionID
func deleteSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<Void>
func readSession(_ sessionID: SessionID, for request: Request) -> EventLoopFuture<SessionData?>
func updateSession(_ sessionID: SessionID, to data: SessionData, for request: Request) -> EventLoopFuture<SessionID>