-
Notifications
You must be signed in to change notification settings - Fork 14
PathParameter
Represents a dynamic parameter inside the URL. Parameter
placeholders should be prefaced with a colon (:
) in
the route string. Something like :user_id
in the
path /v1/users/:user_id
.
public struct PathParameter: Equatable
Equatable
The escaped parameter that was matched, without the colon.
Something like user_id
if :user_id
was in the path.
let parameter: String
The actual string value of the parameter.
let stringValue: String
Decodes a UUID
from this parameter's value or throws if the
string is an invalid UUID
.
public func uuid() throws -> UUID
A PathParameter.DecodingError
if the value string is not convertible to a UUID
.
The decoded UUID
.
Returns the String
value of this parameter.
public func string() -> String
the value of this parameter.
Decodes an Int
from this parameter's value or throws if the
string can't be converted to an Int
.
public func int() throws -> Int
a PathParameter.DecodingError
if the value string is not convertible to a Int
.
the decoded Int
.
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue