Flash

zio.http.Flash
See theFlash companion trait
object Flash

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Flash.type

Members list

Type members

Classlikes

object Backend

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Backend.type
trait Backend

Flash.Backend represents a flash-scope that is not cookie-based but instead uses an internal structure.

Flash.Backend represents a flash-scope that is not cookie-based but instead uses an internal structure.

Semantically it is identical to the cookie-based flash-scope (valid for a single request) but by using Flash.Backend we're not limited in size of the payload as in the cookie-based flash-scope. Still, the Flash.Backend uses a cookie but does not transport the payload with it but only an internal identifier.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Message[+A, +B]

A fash message can represent a notice, an alert or both - it's some kind of a specialized zio.prelude.These.

A fash message can represent a notice, an alert or both - it's some kind of a specialized zio.prelude.These.

Using a flash message allows one to categorize those into notice or alert and by that wrap both messages with a different ui design.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Message[A, B]
sealed trait Setter[A]

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Setter[A]

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fail(message: String): Flash[Nothing]
def get[A : Schema](key: String): Flash[A]

Gets any flash value of type A with the given key key.

Gets any flash value of type A with the given key key.

Attributes

def get[A : Schema]: Flash[A]

Gets the first flash value of type A regardless of any key.

Gets the first flash value of type A regardless of any key.

Attributes

def getAlert[A : Schema]: Flash[A]

Gets a flash value of type A associated with the alert key.

Gets a flash value of type A associated with the alert key.

Attributes

def getBoolean(key: String): Flash[Boolean]

Gets a flash value of type Boolean with the given key key.

Gets a flash value of type Boolean with the given key key.

Attributes

def getDouble(key: String): Flash[Double]

Gets a flash value of type Double with the given key key.

Gets a flash value of type Double with the given key key.

Attributes

def getFloat(key: String): Flash[Float]

Gets a flash value of type Float with the given key key.

Gets a flash value of type Float with the given key key.

Attributes

def getInt(key: String): Flash[Int]

Gets a flash value of type Int with the given key key.

Gets a flash value of type Int with the given key key.

Attributes

def getLong(key: String): Flash[Long]

Gets a flash value of type Long with the given key key.

Gets a flash value of type Long with the given key key.

Attributes

def getMessage[A, B](flashNotice: Flash[A], flashAlert: Flash[B]): Flash[Message[A, B]]

Creates a Flash.Message from two other values flashNotice and flashAlert.

Creates a Flash.Message from two other values flashNotice and flashAlert.

Uses flashNotice to create a Flash.Message representing a notice.

Uses flashAlert to create a Flash.Message representing an alert.

If flashNotice and flashAlert are both available in the flash scope the resulting Flash.Message will represent both.

Attributes

Creates a Flash.Message using the default keys for notice and alert.

Creates a Flash.Message using the default keys for notice and alert.

Additionally the values must be of type String so they can be transformed to Html.

Usage e.g.: Flash.getMessageHtml.foldHtml(showNotice, showAlert)(_ ++ _)

Attributes

def getNotice[A : Schema]: Flash[A]

Gets a flash value of type A associated with the notice key.

Gets a flash value of type A associated with the notice key.

Attributes

def getString(key: String): Flash[String]

Gets a flash value of type String with the given key key.

Gets a flash value of type String with the given key key.

Attributes

def getUUID(key: String): Flash[UUID]

Gets a flash value of type UUID with the given key key.

Gets a flash value of type UUID with the given key key.

Attributes

def setAlert[A : Schema](a: A): Setter[A]

Sets a flash value of type A with the key for an alert.

Sets a flash value of type A with the key for an alert.

Attributes

def setEmpty: Setter[Unit]
def setNotice[A : Schema](a: A): Setter[A]

Sets a flash value of type A with the key for a notice.

Sets a flash value of type A with the key for a notice.

Attributes

def setValue[A : Schema](key: String, a: A): Setter[A]

Sets a flash value of type A with the given key key.

Sets a flash value of type A with the given key key.

Attributes

def succeed[A](a: A): Flash[A]