codetemplate

package codetemplate

Type members

Classlikes

class Cache[V](compiler: String => Try[V], default: Try[V])

A very basic cache of some resource V which an be created based on an input stream

A very basic cache of some resource V which an be created based on an input stream

Value Params
compiler

the compiler function - compile some expression into a value of type V

Provides a script-able means to produce some type B for any type A

Provides a script-able means to produce some type B for any type A

case
class Context[A](record: A, env: Env, fs: FileSystem)

The context is passed to some black-box function which is intended to compute a result

The context is passed to some black-box function which is intended to compute a result

Type Params
A

the record (message) type

Value Params
env

a system environment

fs

a handle to a file system like thing

record

some message input

Companion
object
object Context
Companion
class
case
class DynamicJson(value: Json) extends Dynamic

Like circe optics - pimped dynamic type on top of circe json

Like circe optics - pimped dynamic type on top of circe json

Companion
object
Companion
class
case
class Env(env: Map[String, String]) extends Dynamic
final case
class FileSystem(dir: Path) extends AnyVal with Dynamic
Companion
object
object FileSystem
Companion
class
case
class Message[K, V](content: V, key: K, timestamp: Long, headers: Map[String, String], topic: String, offset: Long, partition: Int)

This may look familiar. A "generic" message type

This may look familiar. A "generic" message type

Companion
object
object Message
Companion
class

Functions for scripting string interpolation.

Functions for scripting string interpolation.

e.g turn some Context into a string, with use-cases like:

 someJsonDoc = """ { "key" : "{{ record.key.toUpperCase }}", "foo" : "{{ if (record.content.path.to.foo) "x" else "y" }}", "double-host" : "{{ env.HOST * 2 }}"  } """
object Unquote
object implicits extends LowPriority