Validator

inner class Validator @JvmOverloads constructor(cacheSize: Long? = null) : Server.Plugin

Schema.Validator is a Server.Plugin that validates the Bolt.Run.query and Bolt.Run.parameters in a Bolt.Run message. If the data in the Bolt.Message is invalid, according to the Schema, then a Bolt.Failure and Bolt.Ignored is returned upon the next Bolt.Pull.

Parameters

cacheSize

the maximum entries in the cache of validated queries

Constructors

Link copied to clipboard
constructor(cacheSize: Long? = null)

Functions

Link copied to clipboard
open suspend override fun intercept(session: Bolt.Session, message: Bolt.Message): Bolt.Message

Intercept, and optionally transform, the message.

Link copied to clipboard
open suspend override fun observe(event: Server.Event)

Observe the event.

Link copied to clipboard
open infix fun then(that: Server.Plugin): Server.Plugin

Run this Server.Plugin then that.