Other Functions
The following functions are available globally.
-
Declaration
Swift
func generateSchedule(startDate: Date, length: Int) -
Declaration
Swift
func printEvent(date: Date, startTime: String, endTime: String, summary: String, description: String, location: String, categories: String, uid: String)
-
Three differernt POST structs contain username fields; this fn exists to ensure they all validate the username the same way. This fn is designed to return a list of validation failure strings–if it returns an empty array the username is valid.
Declaration
Swift
private func usernameValidations(username: String) -> [String] -
Returns the file system path for the given image filename. Makes sure all image directories in the path exist.
Currently, this fn returns paths in the form:
/images/ / / .jpg where “xx” is the first 2 characters of the filename. Declaration
Swift
func getImagePath(for image: String, format: String? = nil, usage: ImageUsage, size: ImageSizeGroup, on req: Request) throws -> URL
-
Declaration
Swift
func generateContentGroups(from reports: [ReportModerationData]) -> [ReportContentGroup] -
Declaration
Swift
private func titleAndTab(for req: Request) -> (String, TrunkContext.Tab) -
Declaration
Swift
private func titleAndTab(for req: Request, seamail: FezData) -> (String, TrunkContext.Tab) -
Register your application’s routes here.
Declaration
Swift
public func routes(_ app: Application) throws
View on GitHub
Other Functions Reference