uritemplate4s
package uritemplate4s
- Alphabetic
- By Inheritance
- uritemplate4s
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class AssociativeArray(value: Seq[(String, String)]) extends Value with Product with Serializable
Name value pairs for template substitution.
- final case class ComponentsUriTemplate(components: List[Component]) extends UriTemplate with Product with Serializable
- sealed abstract class Error extends Exception
Base error type.
- sealed abstract class ExpandFailure extends Error
Error when a UriTemplate is expanded.
- final case class ExpandFailures(errors: List[ExpandFailure]) extends ExpandFailure with Product with Serializable
- sealed trait ExpandResult extends AnyRef
A successfully parsed uri template can always be expanded, but there might be some warnings associated.
- final case class InvalidCombinationFailure(message: String) extends ExpandFailure with Product with Serializable
Error when the value supplied for substitution is not supported.
- final case class ListValue(value: Seq[String]) extends Value with Product with Serializable
A list of values for template substitution.
- final case class MissingValueFailure(varname: String) extends ExpandFailure with Product with Serializable
Error when a value has not been supplied for the template variable.
Error when a value has not been supplied for the template variable.
>>> uritemplate"http://{missingval}.com{/present}".expand("present" -> "foo").toEither Left(uritemplate4s.MissingValueFailure: missingval wasn't supplied as a variable value)
- final case class ParseFailure(index: Int, message: String) extends Error with Product with Serializable
Error when parsing a UriTemplate.
Error when parsing a UriTemplate.
- index
the index where parsing failed.
- message
error message.
- final case class StringValue(value: String) extends Value with Product with Serializable
A single string value for template substitution.
- trait ToStringValue[A] extends ToValue[A]
Type class that provides a conversion from A to String.
Type class that provides a conversion from A to String. This is used to define a specific type class for strings, to be used for the elements of ListValue and the values of AssociativeArray.
- trait ToValue[A] extends AnyRef
Type class that provides a conversion from A to Value.
Type class that provides a conversion from A to Value.
- Annotations
- @implicitNotFound("No Argument instance found for ${A}. For more info, see: https://slakah.github.io/uritemplate4s/tovalue.html")
- trait UriTemplate extends UriTemplateBase with UriTemplateArities
- final class UriTemplateLiteralMacros extends AnyRef
- implicit final class UriTemplateStringContext extends AnyRef
Parse and validate a Uri Template at compile time.
Parse and validate a Uri Template at compile time.
>>> Right(uritemplate"http://{name}.com") == UriTemplate.parse("http://{name}.com") true >>> compileError("""uritemplate"http://{invalid" """).msg not a valid URI Template, Position 1:16, found ""
- sealed trait Value extends AnyRef
A value can be substituted in a template.
Value Members
- object ExpandResult
- object ToStringValue
- object ToValue
- object UriTemplate
- object ast