-
Declaration
Swift
func registerRoutes(_ app: Application) throws -
categoryIDParamExtension methodDeclaration
Swift
var categoryIDParam: PathComponent { get } -
twarrtIDParamExtension methodDeclaration
Swift
var twarrtIDParam: PathComponent { get } -
forumIDParamExtension methodDeclaration
Swift
var forumIDParam: PathComponent { get } -
postIDParamExtension methodDeclaration
Swift
var postIDParam: PathComponent { get } -
fezIDParamExtension methodDeclaration
Swift
var fezIDParam: PathComponent { get } -
fezPostIDParamExtension methodDeclaration
Swift
var fezPostIDParam: PathComponent { get } -
userIDParamExtension methodDeclaration
Swift
var userIDParam: PathComponent { get } -
eventIDParamExtension methodDeclaration
Swift
var eventIDParam: PathComponent { get } -
reportIDParamExtension methodDeclaration
Swift
var reportIDParam: PathComponent { get } -
modStateParamExtension methodDeclaration
Swift
var modStateParam: PathComponent { get } -
announcementIDParamExtension methodDeclaration
Swift
var announcementIDParam: PathComponent { get } -
alertwordParamExtension methodDeclaration
Swift
var alertwordParam: PathComponent { get } -
mutewordParamExtension methodDeclaration
Swift
var mutewordParam: PathComponent { get } -
searchStringParamExtension methodDeclaration
Swift
var searchStringParam: PathComponent { get } -
dailyThemeIDParamExtension methodDeclaration
Swift
var dailyThemeIDParam: PathComponent { get } -
accessLevelParamExtension methodDeclaration
Swift
var accessLevelParam: PathComponent { get } -
boardgameIDParamExtension methodDeclaration
Swift
var boardgameIDParam: PathComponent { get } -
songIDParamExtension methodDeclaration
Swift
var songIDParam: PathComponent { get } -
mkSongIDParamExtension methodDeclaration
Swift
var mkSongIDParam: PathComponent { get } -
mkSnippetIDParamExtension methodDeclaration
Swift
var mkSnippetIDParam: PathComponent { get } -
userRoleParamExtension methodDeclaration
Swift
var userRoleParam: PathComponent { get } -
phonecallParamExtension methodDeclaration
Swift
var phonecallParam: PathComponent { get } -
scheduleLogIDParamExtension methodDeclaration
Swift
var scheduleLogIDParam: PathComponent { get } -
filenameParamExtension methodDeclaration
Swift
var filenameParam: PathComponent { get } -
imageFilenameParamExtension methodDeclaration
Swift
var imageFilenameParam: PathComponent { get } -
streamPhotoIDParamExtension methodDeclaration
Swift
var streamPhotoIDParam: PathComponent { get } -
performerIDParamExtension methodDeclaration
Swift
var performerIDParam: PathComponent { get } -
personalEventIDParamExtension methodDeclaration
Swift
var personalEventIDParam: PathComponent { get } -
huntIDParamExtension methodDeclaration
Swift
var huntIDParam: PathComponent { get } -
puzzleIDParamExtension methodDeclaration
Swift
var puzzleIDParam: PathComponent { get } -
eventUIDParamExtension methodDeclaration
Swift
var eventUIDParam: PathComponent { get } -
feedbackIDParamExtension methodDeclaration
Swift
var feedbackIDParam: PathComponent { get } -
dateFromParameter(string:Extension method) Transforms a string that might represent a date (either a
Doubleor an ISO 8601 representation) into aDate, if possible.Note
The representation is expected to be either a string literal
Double, or a string in UTCyyyy-MM-dd'T'HH:mm:ssZformat.Declaration
Swift
static func dateFromParameter(string: String) -> Date?Parameters
stringThe string to be transformed.
Return Value
A
Dateif the conversion was successful, otherwisenil.
-
guardNotSpecialAccount(_:Extension method) Declaration
Swift
func guardNotSpecialAccount(_ targetUser: User) throws
-
addNotifications(users:Extension method, asynchronoustype: info: creatorID: on: ) Declaration
Swift
func addNotifications(users: [UUID], type: NotificationType, info: String, creatorID: UUID? = nil, on req: Request) async throws -
bookkeepUserAddedToChat(req:Extension methodmsgID: chatType: users: group: ) Declaration
Swift
func bookkeepUserAddedToChat( req: Request, msgID: UUID, chatType: FezType, users: [UUID], group: inout ThrowingTaskGroup<Void, Error> ) -> [UUID] -
bookkeepNewChatMessage(req:Extension methodmsgID: chatType: users: group: creatorID: ) Declaration
Swift
func bookkeepNewChatMessage(req: Request, msgID: UUID, chatType: FezType, users: [UUID], group: inout ThrowingTaskGroup<Void, Error>, creatorID: UUID? = nil) -> [UUID] -
subtractNotifications(users:Extension method, asynchronoustype: subtractCount: on: ) Declaration
Swift
func subtractNotifications(users: [UUID], type: NotificationType, subtractCount: Int = 1, on req: Request) async throws -
deleteFezNotifications(userIDs:Extension method, asynchronousfez: on: ) Declaration
Swift
func deleteFezNotifications(userIDs: [UUID], fez: FriendlyFez, on req: Request) async throws -
markNotificationViewed(user:Extension method, asynchronoustype: on: ) Declaration
Swift
func markNotificationViewed(user: UserCacheData, type: NotificationType, on req: Request) async throws -
markNotificationViewed(for:Extension method, asynchronoustype: on: ) Declaration
Swift
func markNotificationViewed(for users: [UserCacheData], type: NotificationType, on req: Request) async throws -
storeNextFollowedEvent(userID:Extension method, asynchronouson: ) Declaration
Swift
func storeNextFollowedEvent(userID: UUID, on req: Request) async throws -> (Date, UUID)? -
storeNextJoinedAppointment(userID:Extension method, asynchronouson: ) Declaration
Swift
func storeNextJoinedAppointment(userID: UUID, on req: Request) async throws -> (Date, UUID)? -
processImages(_:Extension method, asynchronoususage: on: ) Takes an an array of
ImageUploadDataas input. Some of the input elements may be new image Data that needs procssing; some of the input elements may refer to already-processed images in our image store. Once all the ImageUploadData elements are processed, returns a[String]containing the filenames where al the images are stored. The use case here is for editing existing content with image attachments in a way that prevents re-uploading of photos that are already on the server.- req: The incoming
Request, on which this processing must run.
Declaration
Swift
func processImages(_ images: [ImageUploadData], usage: ImageUsage, on req: Request) async throws -> [String]Parameters
imagesThe images in
ImageUploadDataformat.usageThe type of model using the image content.
Return Value
The generated names of the stored files.
- req: The incoming
-
processImage(data:Extension method, asynchronoususage: on: ) Takes an optional image in Data form as input, produces full and thumbnail JPEG vrsions, places both the thumbnail and full image in their respective directories, and returns the generated name of the file on success, an empty string otherwise.
- req: The incoming
Request, on which this processing must run.
Declaration
Swift
func processImage(data: Data?, usage: ImageUsage, on req: Request) async throws -> String?Parameters
dataThe uploaded image in
Dataformat.usageThe type of model using the image content.
Return Value
The generated name of the stored file, or nil.
- req: The incoming
-
regenerateThumbnail(for:Extension method, asynchronouson: ) Declaration
Swift
func regenerateThumbnail(for imageSource: URL, on req: Request) async throws -
archiveImage(_:Extension methodon: ) Archives an image that is no longer needed other than for accountability tracking, by removing the full-sized image and moving the thumbnail into the
archive/subdirectory of the provided base image directory.This is a synchronous operation, until such time as we can use SwiftNIO 2’s asynchronous file I/O.
Declaration
Swift
func archiveImage(_ image: String, on req: Request)Parameters
imageThe filename of the image.
imageDirThe base image directory path for the image’s context.
View on GitHub